commit 24fde42573a1b51b278fdf5cd2fc1d8d1444d7d3
Author: chiteroman <98092901+chiteroman@users.noreply.github.com>
Date: Tue Oct 31 12:37:11 2023 +0100
Fix code
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..aa724b7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+.cxx
+local.properties
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..b79ccd4
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "app/src/main/cpp/Dobby"]
+ path = app/src/main/cpp/Dobby
+ url = https://github.com/jmpews/Dobby.git
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..b589d56
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..ae388c2
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..4d299ab
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000..2c7451d
--- /dev/null
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..8978d23
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..45ac14d
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
new file mode 100644
index 0000000..06f252d
--- /dev/null
+++ b/app/build.gradle.kts
@@ -0,0 +1,52 @@
+plugins {
+ id("com.android.application")
+}
+
+android {
+ namespace = "es.chiteroman.playintegrityfix"
+ compileSdk = 34
+
+ packaging {
+ jniLibs {
+ excludes += "**/libdobby.so"
+ }
+ }
+
+ defaultConfig {
+ applicationId = "es.chiteroman.playintegrityfix"
+ minSdk = 26
+ targetSdk = 34
+ versionCode = 1
+ versionName = "1.0"
+
+ externalNativeBuild {
+ cmake {
+ arguments += "-DANDROID_STL=none"
+ arguments += "-DCMAKE_BUILD_TYPE=MinSizeRel"
+ }
+ }
+ }
+
+ buildTypes {
+ release {
+ isMinifyEnabled = true
+ isShrinkResources = true
+ proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
+ }
+ }
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_1_8
+ targetCompatibility = JavaVersion.VERSION_1_8
+ }
+
+ externalNativeBuild {
+ cmake {
+ path = file("src/main/cpp/CMakeLists.txt")
+ version = "3.22.1"
+ }
+ }
+
+ ndkVersion = "26.1.10909125"
+ buildToolsVersion = "34.0.0"
+}
\ No newline at end of file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..568741e
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/app/src/main/cpp/CMakeLists.txt b/app/src/main/cpp/CMakeLists.txt
new file mode 100644
index 0000000..d46e1d5
--- /dev/null
+++ b/app/src/main/cpp/CMakeLists.txt
@@ -0,0 +1,26 @@
+cmake_minimum_required(VERSION 3.22.1)
+
+project(zygisk)
+
+include_directories(libcxx/include libcxx/include/abi)
+
+link_libraries(${CMAKE_SOURCE_DIR}/libcxx/${CMAKE_ANDROID_ARCH_ABI}.a)
+
+add_subdirectory(Dobby)
+
+add_library(${CMAKE_PROJECT_NAME} SHARED
+ main.cpp)
+
+target_compile_features(${CMAKE_PROJECT_NAME} PRIVATE
+ c_std_23
+ cxx_std_23)
+
+target_compile_options(${CMAKE_PROJECT_NAME} PRIVATE
+ -fno-exceptions
+ -fno-rtti
+ -fvisibility=hidden
+ -fvisibility-inlines-hidden)
+
+target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
+ log
+ dobby_static)
\ No newline at end of file
diff --git a/app/src/main/cpp/Dobby b/app/src/main/cpp/Dobby
new file mode 160000
index 0000000..b0176de
--- /dev/null
+++ b/app/src/main/cpp/Dobby
@@ -0,0 +1 @@
+Subproject commit b0176de574104726bb68dff3b77ee666300fc338
diff --git a/app/src/main/cpp/libcxx/arm64-v8a.a b/app/src/main/cpp/libcxx/arm64-v8a.a
new file mode 100644
index 0000000..a923662
Binary files /dev/null and b/app/src/main/cpp/libcxx/arm64-v8a.a differ
diff --git a/app/src/main/cpp/libcxx/armeabi-v7a.a b/app/src/main/cpp/libcxx/armeabi-v7a.a
new file mode 100644
index 0000000..5e94371
Binary files /dev/null and b/app/src/main/cpp/libcxx/armeabi-v7a.a differ
diff --git a/app/src/main/cpp/libcxx/include/CMakeLists.txt b/app/src/main/cpp/libcxx/include/CMakeLists.txt
new file mode 100644
index 0000000..a12aa1d
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/CMakeLists.txt
@@ -0,0 +1,934 @@
+set(files
+ __algorithm/adjacent_find.h
+ __algorithm/all_of.h
+ __algorithm/any_of.h
+ __algorithm/binary_search.h
+ __algorithm/clamp.h
+ __algorithm/comp.h
+ __algorithm/comp_ref_type.h
+ __algorithm/copy.h
+ __algorithm/copy_backward.h
+ __algorithm/copy_if.h
+ __algorithm/copy_move_common.h
+ __algorithm/copy_n.h
+ __algorithm/count.h
+ __algorithm/count_if.h
+ __algorithm/equal.h
+ __algorithm/equal_range.h
+ __algorithm/fill.h
+ __algorithm/fill_n.h
+ __algorithm/find.h
+ __algorithm/find_end.h
+ __algorithm/find_first_of.h
+ __algorithm/find_if.h
+ __algorithm/find_if_not.h
+ __algorithm/for_each.h
+ __algorithm/for_each_n.h
+ __algorithm/generate.h
+ __algorithm/generate_n.h
+ __algorithm/half_positive.h
+ __algorithm/in_found_result.h
+ __algorithm/in_fun_result.h
+ __algorithm/in_in_out_result.h
+ __algorithm/in_in_result.h
+ __algorithm/in_out_out_result.h
+ __algorithm/in_out_result.h
+ __algorithm/includes.h
+ __algorithm/inplace_merge.h
+ __algorithm/is_heap.h
+ __algorithm/is_heap_until.h
+ __algorithm/is_partitioned.h
+ __algorithm/is_permutation.h
+ __algorithm/is_sorted.h
+ __algorithm/is_sorted_until.h
+ __algorithm/iter_swap.h
+ __algorithm/iterator_operations.h
+ __algorithm/lexicographical_compare.h
+ __algorithm/lower_bound.h
+ __algorithm/make_heap.h
+ __algorithm/make_projected.h
+ __algorithm/max.h
+ __algorithm/max_element.h
+ __algorithm/merge.h
+ __algorithm/min.h
+ __algorithm/min_element.h
+ __algorithm/min_max_result.h
+ __algorithm/minmax.h
+ __algorithm/minmax_element.h
+ __algorithm/mismatch.h
+ __algorithm/move.h
+ __algorithm/move_backward.h
+ __algorithm/next_permutation.h
+ __algorithm/none_of.h
+ __algorithm/nth_element.h
+ __algorithm/partial_sort.h
+ __algorithm/partial_sort_copy.h
+ __algorithm/partition.h
+ __algorithm/partition_copy.h
+ __algorithm/partition_point.h
+ __algorithm/pop_heap.h
+ __algorithm/prev_permutation.h
+ __algorithm/push_heap.h
+ __algorithm/ranges_adjacent_find.h
+ __algorithm/ranges_all_of.h
+ __algorithm/ranges_any_of.h
+ __algorithm/ranges_binary_search.h
+ __algorithm/ranges_clamp.h
+ __algorithm/ranges_copy.h
+ __algorithm/ranges_copy_backward.h
+ __algorithm/ranges_copy_if.h
+ __algorithm/ranges_copy_n.h
+ __algorithm/ranges_count.h
+ __algorithm/ranges_count_if.h
+ __algorithm/ranges_equal.h
+ __algorithm/ranges_equal_range.h
+ __algorithm/ranges_fill.h
+ __algorithm/ranges_fill_n.h
+ __algorithm/ranges_find.h
+ __algorithm/ranges_find_end.h
+ __algorithm/ranges_find_first_of.h
+ __algorithm/ranges_find_if.h
+ __algorithm/ranges_find_if_not.h
+ __algorithm/ranges_for_each.h
+ __algorithm/ranges_for_each_n.h
+ __algorithm/ranges_generate.h
+ __algorithm/ranges_generate_n.h
+ __algorithm/ranges_includes.h
+ __algorithm/ranges_inplace_merge.h
+ __algorithm/ranges_is_heap.h
+ __algorithm/ranges_is_heap_until.h
+ __algorithm/ranges_is_partitioned.h
+ __algorithm/ranges_is_permutation.h
+ __algorithm/ranges_is_sorted.h
+ __algorithm/ranges_is_sorted_until.h
+ __algorithm/ranges_iterator_concept.h
+ __algorithm/ranges_lexicographical_compare.h
+ __algorithm/ranges_lower_bound.h
+ __algorithm/ranges_make_heap.h
+ __algorithm/ranges_max.h
+ __algorithm/ranges_max_element.h
+ __algorithm/ranges_merge.h
+ __algorithm/ranges_min.h
+ __algorithm/ranges_min_element.h
+ __algorithm/ranges_minmax.h
+ __algorithm/ranges_minmax_element.h
+ __algorithm/ranges_mismatch.h
+ __algorithm/ranges_move.h
+ __algorithm/ranges_move_backward.h
+ __algorithm/ranges_next_permutation.h
+ __algorithm/ranges_none_of.h
+ __algorithm/ranges_nth_element.h
+ __algorithm/ranges_partial_sort.h
+ __algorithm/ranges_partial_sort_copy.h
+ __algorithm/ranges_partition.h
+ __algorithm/ranges_partition_copy.h
+ __algorithm/ranges_partition_point.h
+ __algorithm/ranges_pop_heap.h
+ __algorithm/ranges_prev_permutation.h
+ __algorithm/ranges_push_heap.h
+ __algorithm/ranges_remove.h
+ __algorithm/ranges_remove_copy.h
+ __algorithm/ranges_remove_copy_if.h
+ __algorithm/ranges_remove_if.h
+ __algorithm/ranges_replace.h
+ __algorithm/ranges_replace_copy.h
+ __algorithm/ranges_replace_copy_if.h
+ __algorithm/ranges_replace_if.h
+ __algorithm/ranges_reverse.h
+ __algorithm/ranges_reverse_copy.h
+ __algorithm/ranges_rotate.h
+ __algorithm/ranges_rotate_copy.h
+ __algorithm/ranges_sample.h
+ __algorithm/ranges_search.h
+ __algorithm/ranges_search_n.h
+ __algorithm/ranges_set_difference.h
+ __algorithm/ranges_set_intersection.h
+ __algorithm/ranges_set_symmetric_difference.h
+ __algorithm/ranges_set_union.h
+ __algorithm/ranges_shuffle.h
+ __algorithm/ranges_sort.h
+ __algorithm/ranges_sort_heap.h
+ __algorithm/ranges_stable_partition.h
+ __algorithm/ranges_stable_sort.h
+ __algorithm/ranges_swap_ranges.h
+ __algorithm/ranges_transform.h
+ __algorithm/ranges_unique.h
+ __algorithm/ranges_unique_copy.h
+ __algorithm/ranges_upper_bound.h
+ __algorithm/remove.h
+ __algorithm/remove_copy.h
+ __algorithm/remove_copy_if.h
+ __algorithm/remove_if.h
+ __algorithm/replace.h
+ __algorithm/replace_copy.h
+ __algorithm/replace_copy_if.h
+ __algorithm/replace_if.h
+ __algorithm/reverse.h
+ __algorithm/reverse_copy.h
+ __algorithm/rotate.h
+ __algorithm/rotate_copy.h
+ __algorithm/sample.h
+ __algorithm/search.h
+ __algorithm/search_n.h
+ __algorithm/set_difference.h
+ __algorithm/set_intersection.h
+ __algorithm/set_symmetric_difference.h
+ __algorithm/set_union.h
+ __algorithm/shift_left.h
+ __algorithm/shift_right.h
+ __algorithm/shuffle.h
+ __algorithm/sift_down.h
+ __algorithm/sort.h
+ __algorithm/sort_heap.h
+ __algorithm/stable_partition.h
+ __algorithm/stable_sort.h
+ __algorithm/swap_ranges.h
+ __algorithm/transform.h
+ __algorithm/uniform_random_bit_generator_adaptor.h
+ __algorithm/unique.h
+ __algorithm/unique_copy.h
+ __algorithm/unwrap_iter.h
+ __algorithm/unwrap_range.h
+ __algorithm/upper_bound.h
+ __assert
+ __availability
+ __bit/bit_cast.h
+ __bit/bit_ceil.h
+ __bit/bit_floor.h
+ __bit/bit_log2.h
+ __bit/bit_width.h
+ __bit/blsr.h
+ __bit/byteswap.h
+ __bit/countl.h
+ __bit/countr.h
+ __bit/endian.h
+ __bit/has_single_bit.h
+ __bit/popcount.h
+ __bit/rotate.h
+ __bit_reference
+ __bsd_locale_defaults.h
+ __bsd_locale_fallbacks.h
+ __charconv/chars_format.h
+ __charconv/from_chars_result.h
+ __charconv/tables.h
+ __charconv/to_chars_base_10.h
+ __charconv/to_chars_result.h
+ __chrono/calendar.h
+ __chrono/convert_to_timespec.h
+ __chrono/convert_to_tm.h
+ __chrono/day.h
+ __chrono/duration.h
+ __chrono/file_clock.h
+ __chrono/formatter.h
+ __chrono/hh_mm_ss.h
+ __chrono/high_resolution_clock.h
+ __chrono/literals.h
+ __chrono/month.h
+ __chrono/month_weekday.h
+ __chrono/monthday.h
+ __chrono/ostream.h
+ __chrono/parser_std_format_spec.h
+ __chrono/statically_widen.h
+ __chrono/steady_clock.h
+ __chrono/system_clock.h
+ __chrono/time_point.h
+ __chrono/weekday.h
+ __chrono/year.h
+ __chrono/year_month.h
+ __chrono/year_month_day.h
+ __chrono/year_month_weekday.h
+ __compare/common_comparison_category.h
+ __compare/compare_partial_order_fallback.h
+ __compare/compare_strong_order_fallback.h
+ __compare/compare_three_way.h
+ __compare/compare_three_way_result.h
+ __compare/compare_weak_order_fallback.h
+ __compare/is_eq.h
+ __compare/ordering.h
+ __compare/partial_order.h
+ __compare/strong_order.h
+ __compare/synth_three_way.h
+ __compare/three_way_comparable.h
+ __compare/weak_order.h
+ __concepts/arithmetic.h
+ __concepts/assignable.h
+ __concepts/boolean_testable.h
+ __concepts/class_or_enum.h
+ __concepts/common_reference_with.h
+ __concepts/common_with.h
+ __concepts/constructible.h
+ __concepts/convertible_to.h
+ __concepts/copyable.h
+ __concepts/derived_from.h
+ __concepts/destructible.h
+ __concepts/different_from.h
+ __concepts/equality_comparable.h
+ __concepts/invocable.h
+ __concepts/movable.h
+ __concepts/predicate.h
+ __concepts/regular.h
+ __concepts/relation.h
+ __concepts/same_as.h
+ __concepts/semiregular.h
+ __concepts/swappable.h
+ __concepts/totally_ordered.h
+ __config
+ __coroutine/coroutine_handle.h
+ __coroutine/coroutine_traits.h
+ __coroutine/noop_coroutine_handle.h
+ __coroutine/trivial_awaitables.h
+ __debug
+ __debug_utils/randomize_range.h
+ __errc
+ __expected/bad_expected_access.h
+ __expected/expected.h
+ __expected/unexpect.h
+ __expected/unexpected.h
+ __filesystem/copy_options.h
+ __filesystem/directory_entry.h
+ __filesystem/directory_iterator.h
+ __filesystem/directory_options.h
+ __filesystem/file_status.h
+ __filesystem/file_time_type.h
+ __filesystem/file_type.h
+ __filesystem/filesystem_error.h
+ __filesystem/operations.h
+ __filesystem/path.h
+ __filesystem/path_iterator.h
+ __filesystem/perm_options.h
+ __filesystem/perms.h
+ __filesystem/recursive_directory_iterator.h
+ __filesystem/space_info.h
+ __filesystem/u8path.h
+ __format/buffer.h
+ __format/concepts.h
+ __format/container_adaptor.h
+ __format/enable_insertable.h
+ __format/escaped_output_table.h
+ __format/extended_grapheme_cluster_table.h
+ __format/format_arg.h
+ __format/format_arg_store.h
+ __format/format_args.h
+ __format/format_context.h
+ __format/format_error.h
+ __format/format_functions.h
+ __format/format_fwd.h
+ __format/format_parse_context.h
+ __format/format_string.h
+ __format/format_to_n_result.h
+ __format/formatter.h
+ __format/formatter_bool.h
+ __format/formatter_char.h
+ __format/formatter_floating_point.h
+ __format/formatter_integer.h
+ __format/formatter_integral.h
+ __format/formatter_output.h
+ __format/formatter_pointer.h
+ __format/formatter_string.h
+ __format/formatter_tuple.h
+ __format/parser_std_format_spec.h
+ __format/range_default_formatter.h
+ __format/range_formatter.h
+ __format/unicode.h
+ __functional/binary_function.h
+ __functional/binary_negate.h
+ __functional/bind.h
+ __functional/bind_back.h
+ __functional/bind_front.h
+ __functional/binder1st.h
+ __functional/binder2nd.h
+ __functional/boyer_moore_searcher.h
+ __functional/compose.h
+ __functional/default_searcher.h
+ __functional/function.h
+ __functional/hash.h
+ __functional/identity.h
+ __functional/invoke.h
+ __functional/is_transparent.h
+ __functional/mem_fn.h
+ __functional/mem_fun_ref.h
+ __functional/not_fn.h
+ __functional/operations.h
+ __functional/perfect_forward.h
+ __functional/pointer_to_binary_function.h
+ __functional/pointer_to_unary_function.h
+ __functional/ranges_operations.h
+ __functional/reference_wrapper.h
+ __functional/unary_function.h
+ __functional/unary_negate.h
+ __functional/unwrap_ref.h
+ __functional/weak_result_type.h
+ __fwd/array.h
+ __fwd/get.h
+ __fwd/hash.h
+ __fwd/memory_resource.h
+ __fwd/pair.h
+ __fwd/span.h
+ __fwd/string.h
+ __fwd/string_view.h
+ __fwd/subrange.h
+ __fwd/tuple.h
+ __hash_table
+ __ios/fpos.h
+ __iterator/access.h
+ __iterator/advance.h
+ __iterator/back_insert_iterator.h
+ __iterator/bounded_iter.h
+ __iterator/common_iterator.h
+ __iterator/concepts.h
+ __iterator/counted_iterator.h
+ __iterator/data.h
+ __iterator/default_sentinel.h
+ __iterator/distance.h
+ __iterator/empty.h
+ __iterator/erase_if_container.h
+ __iterator/front_insert_iterator.h
+ __iterator/incrementable_traits.h
+ __iterator/indirectly_comparable.h
+ __iterator/insert_iterator.h
+ __iterator/istream_iterator.h
+ __iterator/istreambuf_iterator.h
+ __iterator/iter_move.h
+ __iterator/iter_swap.h
+ __iterator/iterator.h
+ __iterator/iterator_traits.h
+ __iterator/iterator_with_data.h
+ __iterator/mergeable.h
+ __iterator/move_iterator.h
+ __iterator/move_sentinel.h
+ __iterator/next.h
+ __iterator/ostream_iterator.h
+ __iterator/ostreambuf_iterator.h
+ __iterator/permutable.h
+ __iterator/prev.h
+ __iterator/projected.h
+ __iterator/readable_traits.h
+ __iterator/reverse_access.h
+ __iterator/reverse_iterator.h
+ __iterator/segmented_iterator.h
+ __iterator/size.h
+ __iterator/sortable.h
+ __iterator/unreachable_sentinel.h
+ __iterator/wrap_iter.h
+ __locale
+ __mbstate_t.h
+ __memory/addressof.h
+ __memory/align.h
+ __memory/allocate_at_least.h
+ __memory/allocation_guard.h
+ __memory/allocator.h
+ __memory/allocator_arg_t.h
+ __memory/allocator_destructor.h
+ __memory/allocator_traits.h
+ __memory/assume_aligned.h
+ __memory/auto_ptr.h
+ __memory/builtin_new_allocator.h
+ __memory/compressed_pair.h
+ __memory/concepts.h
+ __memory/construct_at.h
+ __memory/destruct_n.h
+ __memory/pointer_traits.h
+ __memory/ranges_construct_at.h
+ __memory/ranges_uninitialized_algorithms.h
+ __memory/raw_storage_iterator.h
+ __memory/shared_ptr.h
+ __memory/swap_allocator.h
+ __memory/temp_value.h
+ __memory/temporary_buffer.h
+ __memory/uninitialized_algorithms.h
+ __memory/unique_ptr.h
+ __memory/uses_allocator.h
+ __memory/uses_allocator_construction.h
+ __memory/voidify.h
+ __memory_resource/memory_resource.h
+ __memory_resource/monotonic_buffer_resource.h
+ __memory_resource/polymorphic_allocator.h
+ __memory_resource/pool_options.h
+ __memory_resource/synchronized_pool_resource.h
+ __memory_resource/unsynchronized_pool_resource.h
+ __mutex_base
+ __node_handle
+ __numeric/accumulate.h
+ __numeric/adjacent_difference.h
+ __numeric/exclusive_scan.h
+ __numeric/gcd_lcm.h
+ __numeric/inclusive_scan.h
+ __numeric/inner_product.h
+ __numeric/iota.h
+ __numeric/midpoint.h
+ __numeric/partial_sum.h
+ __numeric/reduce.h
+ __numeric/transform_exclusive_scan.h
+ __numeric/transform_inclusive_scan.h
+ __numeric/transform_reduce.h
+ __random/bernoulli_distribution.h
+ __random/binomial_distribution.h
+ __random/cauchy_distribution.h
+ __random/chi_squared_distribution.h
+ __random/clamp_to_integral.h
+ __random/default_random_engine.h
+ __random/discard_block_engine.h
+ __random/discrete_distribution.h
+ __random/exponential_distribution.h
+ __random/extreme_value_distribution.h
+ __random/fisher_f_distribution.h
+ __random/gamma_distribution.h
+ __random/generate_canonical.h
+ __random/geometric_distribution.h
+ __random/independent_bits_engine.h
+ __random/is_seed_sequence.h
+ __random/is_valid.h
+ __random/knuth_b.h
+ __random/linear_congruential_engine.h
+ __random/log2.h
+ __random/lognormal_distribution.h
+ __random/mersenne_twister_engine.h
+ __random/negative_binomial_distribution.h
+ __random/normal_distribution.h
+ __random/piecewise_constant_distribution.h
+ __random/piecewise_linear_distribution.h
+ __random/poisson_distribution.h
+ __random/random_device.h
+ __random/ranlux.h
+ __random/seed_seq.h
+ __random/shuffle_order_engine.h
+ __random/student_t_distribution.h
+ __random/subtract_with_carry_engine.h
+ __random/uniform_int_distribution.h
+ __random/uniform_random_bit_generator.h
+ __random/uniform_real_distribution.h
+ __random/weibull_distribution.h
+ __ranges/access.h
+ __ranges/all.h
+ __ranges/as_rvalue_view.h
+ __ranges/common_view.h
+ __ranges/concepts.h
+ __ranges/copyable_box.h
+ __ranges/counted.h
+ __ranges/dangling.h
+ __ranges/data.h
+ __ranges/drop_view.h
+ __ranges/drop_while_view.h
+ __ranges/elements_view.h
+ __ranges/empty.h
+ __ranges/empty_view.h
+ __ranges/enable_borrowed_range.h
+ __ranges/enable_view.h
+ __ranges/filter_view.h
+ __ranges/iota_view.h
+ __ranges/istream_view.h
+ __ranges/join_view.h
+ __ranges/lazy_split_view.h
+ __ranges/non_propagating_cache.h
+ __ranges/owning_view.h
+ __ranges/range_adaptor.h
+ __ranges/rbegin.h
+ __ranges/ref_view.h
+ __ranges/rend.h
+ __ranges/reverse_view.h
+ __ranges/single_view.h
+ __ranges/size.h
+ __ranges/split_view.h
+ __ranges/subrange.h
+ __ranges/take_view.h
+ __ranges/take_while_view.h
+ __ranges/transform_view.h
+ __ranges/view_interface.h
+ __ranges/views.h
+ __ranges/zip_view.h
+ __split_buffer
+ __std_stream
+ __string/char_traits.h
+ __string/extern_template_lists.h
+ __support/android/locale_bionic.h
+ __support/fuchsia/xlocale.h
+ __support/ibm/gettod_zos.h
+ __support/ibm/locale_mgmt_zos.h
+ __support/ibm/nanosleep.h
+ __support/ibm/xlocale.h
+ __support/musl/xlocale.h
+ __support/newlib/xlocale.h
+ __support/openbsd/xlocale.h
+ __support/solaris/floatingpoint.h
+ __support/solaris/wchar.h
+ __support/solaris/xlocale.h
+ __support/win32/locale_win32.h
+ __support/xlocale/__nop_locale_mgmt.h
+ __support/xlocale/__posix_l_fallback.h
+ __support/xlocale/__strtonum_fallback.h
+ __thread/poll_with_backoff.h
+ __thread/timed_backoff_policy.h
+ __threading_support
+ __tree
+ __tuple_dir/apply_cv.h
+ __tuple_dir/make_tuple_types.h
+ __tuple_dir/pair_like.h
+ __tuple_dir/sfinae_helpers.h
+ __tuple_dir/tuple_element.h
+ __tuple_dir/tuple_indices.h
+ __tuple_dir/tuple_like.h
+ __tuple_dir/tuple_like_ext.h
+ __tuple_dir/tuple_size.h
+ __tuple_dir/tuple_types.h
+ __type_traits/add_const.h
+ __type_traits/add_cv.h
+ __type_traits/add_lvalue_reference.h
+ __type_traits/add_pointer.h
+ __type_traits/add_rvalue_reference.h
+ __type_traits/add_volatile.h
+ __type_traits/aligned_storage.h
+ __type_traits/aligned_union.h
+ __type_traits/alignment_of.h
+ __type_traits/apply_cv.h
+ __type_traits/can_extract_key.h
+ __type_traits/common_reference.h
+ __type_traits/common_type.h
+ __type_traits/conditional.h
+ __type_traits/conjunction.h
+ __type_traits/copy_cv.h
+ __type_traits/copy_cvref.h
+ __type_traits/decay.h
+ __type_traits/dependent_type.h
+ __type_traits/disjunction.h
+ __type_traits/enable_if.h
+ __type_traits/extent.h
+ __type_traits/has_unique_object_representation.h
+ __type_traits/has_virtual_destructor.h
+ __type_traits/integral_constant.h
+ __type_traits/is_abstract.h
+ __type_traits/is_aggregate.h
+ __type_traits/is_allocator.h
+ __type_traits/is_always_bitcastable.h
+ __type_traits/is_arithmetic.h
+ __type_traits/is_array.h
+ __type_traits/is_assignable.h
+ __type_traits/is_base_of.h
+ __type_traits/is_bounded_array.h
+ __type_traits/is_callable.h
+ __type_traits/is_char_like_type.h
+ __type_traits/is_class.h
+ __type_traits/is_compound.h
+ __type_traits/is_const.h
+ __type_traits/is_constant_evaluated.h
+ __type_traits/is_constructible.h
+ __type_traits/is_convertible.h
+ __type_traits/is_copy_assignable.h
+ __type_traits/is_copy_constructible.h
+ __type_traits/is_core_convertible.h
+ __type_traits/is_default_constructible.h
+ __type_traits/is_destructible.h
+ __type_traits/is_empty.h
+ __type_traits/is_enum.h
+ __type_traits/is_final.h
+ __type_traits/is_floating_point.h
+ __type_traits/is_function.h
+ __type_traits/is_fundamental.h
+ __type_traits/is_implicitly_default_constructible.h
+ __type_traits/is_integral.h
+ __type_traits/is_literal_type.h
+ __type_traits/is_member_function_pointer.h
+ __type_traits/is_member_object_pointer.h
+ __type_traits/is_member_pointer.h
+ __type_traits/is_move_assignable.h
+ __type_traits/is_move_constructible.h
+ __type_traits/is_nothrow_assignable.h
+ __type_traits/is_nothrow_constructible.h
+ __type_traits/is_nothrow_convertible.h
+ __type_traits/is_nothrow_copy_assignable.h
+ __type_traits/is_nothrow_copy_constructible.h
+ __type_traits/is_nothrow_default_constructible.h
+ __type_traits/is_nothrow_destructible.h
+ __type_traits/is_nothrow_move_assignable.h
+ __type_traits/is_nothrow_move_constructible.h
+ __type_traits/is_null_pointer.h
+ __type_traits/is_object.h
+ __type_traits/is_pod.h
+ __type_traits/is_pointer.h
+ __type_traits/is_polymorphic.h
+ __type_traits/is_primary_template.h
+ __type_traits/is_reference.h
+ __type_traits/is_reference_wrapper.h
+ __type_traits/is_referenceable.h
+ __type_traits/is_same.h
+ __type_traits/is_scalar.h
+ __type_traits/is_scoped_enum.h
+ __type_traits/is_signed.h
+ __type_traits/is_signed_integer.h
+ __type_traits/is_specialization.h
+ __type_traits/is_standard_layout.h
+ __type_traits/is_swappable.h
+ __type_traits/is_trivial.h
+ __type_traits/is_trivially_assignable.h
+ __type_traits/is_trivially_constructible.h
+ __type_traits/is_trivially_copy_assignable.h
+ __type_traits/is_trivially_copy_constructible.h
+ __type_traits/is_trivially_copyable.h
+ __type_traits/is_trivially_default_constructible.h
+ __type_traits/is_trivially_destructible.h
+ __type_traits/is_trivially_move_assignable.h
+ __type_traits/is_trivially_move_constructible.h
+ __type_traits/is_unbounded_array.h
+ __type_traits/is_union.h
+ __type_traits/is_unsigned.h
+ __type_traits/is_unsigned_integer.h
+ __type_traits/is_valid_expansion.h
+ __type_traits/is_void.h
+ __type_traits/is_volatile.h
+ __type_traits/lazy.h
+ __type_traits/make_32_64_or_128_bit.h
+ __type_traits/make_const_lvalue_ref.h
+ __type_traits/make_signed.h
+ __type_traits/make_unsigned.h
+ __type_traits/maybe_const.h
+ __type_traits/nat.h
+ __type_traits/negation.h
+ __type_traits/noexcept_move_assign_container.h
+ __type_traits/promote.h
+ __type_traits/rank.h
+ __type_traits/remove_all_extents.h
+ __type_traits/remove_const.h
+ __type_traits/remove_const_ref.h
+ __type_traits/remove_cv.h
+ __type_traits/remove_cvref.h
+ __type_traits/remove_extent.h
+ __type_traits/remove_pointer.h
+ __type_traits/remove_reference.h
+ __type_traits/remove_volatile.h
+ __type_traits/result_of.h
+ __type_traits/strip_signature.h
+ __type_traits/type_identity.h
+ __type_traits/type_list.h
+ __type_traits/underlying_type.h
+ __type_traits/void_t.h
+ __undef_macros
+ __utility/as_const.h
+ __utility/auto_cast.h
+ __utility/cmp.h
+ __utility/convert_to_integral.h
+ __utility/declval.h
+ __utility/exception_guard.h
+ __utility/exchange.h
+ __utility/forward.h
+ __utility/forward_like.h
+ __utility/in_place.h
+ __utility/integer_sequence.h
+ __utility/move.h
+ __utility/pair.h
+ __utility/piecewise_construct.h
+ __utility/priority_tag.h
+ __utility/rel_ops.h
+ __utility/swap.h
+ __utility/to_underlying.h
+ __utility/unreachable.h
+ __variant/monostate.h
+ __verbose_abort
+ algorithm
+ any
+ array
+ atomic
+ barrier
+ bit
+ bitset
+ cassert
+ ccomplex
+ cctype
+ cerrno
+ cfenv
+ cfloat
+ charconv
+ chrono
+ cinttypes
+ ciso646
+ climits
+ clocale
+ cmath
+ codecvt
+ compare
+ complex
+ complex.h
+ concepts
+ condition_variable
+ coroutine
+ csetjmp
+ csignal
+ cstdarg
+ cstdbool
+ cstddef
+ cstdint
+ cstdio
+ cstdlib
+ cstring
+ ctgmath
+ ctime
+ ctype.h
+ cuchar
+ cwchar
+ cwctype
+ deque
+ errno.h
+ exception
+ execution
+ expected
+ experimental/__config
+ experimental/__memory
+ experimental/algorithm
+ experimental/coroutine
+ experimental/deque
+ experimental/forward_list
+ experimental/functional
+ experimental/iterator
+ experimental/list
+ experimental/map
+ experimental/memory_resource
+ experimental/propagate_const
+ experimental/regex
+ experimental/set
+ experimental/simd
+ experimental/string
+ experimental/type_traits
+ experimental/unordered_map
+ experimental/unordered_set
+ experimental/utility
+ experimental/vector
+ ext/__hash
+ ext/hash_map
+ ext/hash_set
+ fenv.h
+ filesystem
+ float.h
+ format
+ forward_list
+ fstream
+ functional
+ future
+ initializer_list
+ inttypes.h
+ iomanip
+ ios
+ iosfwd
+ iostream
+ istream
+ iterator
+ latch
+ libcxx.imp
+ limits
+ limits.h
+ list
+ locale
+ locale.h
+ map
+ math.h
+ memory
+ memory_resource
+ mutex
+ new
+ numbers
+ numeric
+ optional
+ ostream
+ queue
+ random
+ ranges
+ ratio
+ regex
+ scoped_allocator
+ semaphore
+ set
+ setjmp.h
+ shared_mutex
+ source_location
+ span
+ sstream
+ stack
+ stdatomic.h
+ stdbool.h
+ stddef.h
+ stdexcept
+ stdint.h
+ stdio.h
+ stdlib.h
+ streambuf
+ string
+ string.h
+ string_view
+ strstream
+ system_error
+ tgmath.h
+ thread
+ tuple
+ type_traits
+ typeindex
+ typeinfo
+ uchar.h
+ unordered_map
+ unordered_set
+ utility
+ valarray
+ variant
+ vector
+ version
+ wchar.h
+ wctype.h
+ )
+
+foreach(feature LIBCXX_ENABLE_FILESYSTEM LIBCXX_ENABLE_LOCALIZATION LIBCXX_ENABLE_FSTREAM LIBCXX_ENABLE_THREADS LIBCXX_ENABLE_WIDE_CHARACTERS)
+ if (NOT ${${feature}})
+ set(requires_${feature} "requires LIBCXX_CONFIGURED_WITHOUT_SUPPORT_FOR_THIS_HEADER")
+ endif()
+endforeach()
+
+configure_file("__config_site.in" "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site" @ONLY)
+configure_file("module.modulemap.in" "${LIBCXX_GENERATED_INCLUDE_DIR}/module.modulemap" @ONLY)
+
+set(_all_includes "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site"
+ "${LIBCXX_GENERATED_INCLUDE_DIR}/module.modulemap")
+foreach(f ${files})
+ set(src "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
+ set(dst "${LIBCXX_GENERATED_INCLUDE_DIR}/${f}")
+ add_custom_command(OUTPUT ${dst}
+ DEPENDS ${src}
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
+ COMMENT "Copying CXX header ${f}")
+ list(APPEND _all_includes "${dst}")
+endforeach()
+
+add_custom_target(generate-cxx-headers ALL DEPENDS ${_all_includes})
+
+add_library(cxx-headers INTERFACE)
+target_link_libraries(cxx-headers INTERFACE libcxx-abi-headers)
+add_dependencies(cxx-headers generate-cxx-headers)
+target_include_directories(cxx-headers INTERFACE ${LIBCXX_GENERATED_INCLUDE_DIR}
+ ${LIBCXX_GENERATED_INCLUDE_TARGET_DIR})
+
+if (LIBCXX_INSTALL_HEADERS)
+ foreach(file ${files})
+ get_filename_component(dir ${file} DIRECTORY)
+ install(FILES ${file}
+ DESTINATION "${LIBCXX_INSTALL_INCLUDE_DIR}/${dir}"
+ COMPONENT cxx-headers
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+ )
+ endforeach()
+
+ # Install the generated __config_site file to the per-target include dir.
+ install(FILES "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site"
+ DESTINATION "${LIBCXX_INSTALL_INCLUDE_TARGET_DIR}"
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+ COMPONENT cxx-headers)
+
+ # Install the generated modulemap file to the generic include dir.
+ install(FILES "${LIBCXX_GENERATED_INCLUDE_DIR}/module.modulemap"
+ DESTINATION "${LIBCXX_INSTALL_INCLUDE_DIR}"
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+ COMPONENT cxx-headers)
+
+ if (NOT CMAKE_CONFIGURATION_TYPES)
+ add_custom_target(install-cxx-headers
+ DEPENDS cxx-headers
+ COMMAND "${CMAKE_COMMAND}"
+ -DCMAKE_INSTALL_COMPONENT=cxx-headers
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
+ # Stripping is a no-op for headers
+ add_custom_target(install-cxx-headers-stripped DEPENDS install-cxx-headers)
+ endif()
+endif()
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/adjacent_find.h b/app/src/main/cpp/libcxx/include/__algorithm/adjacent_find.h
new file mode 100644
index 0000000..30df4a9
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/adjacent_find.h
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/iterator_operations.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
+_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
+_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
+
+#endif // _LIBCPP___ALGORITHM_ADJACENT_FIND_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/all_of.h b/app/src/main/cpp/libcxx/include/__algorithm/all_of.h
new file mode 100644
index 0000000..284c34f
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/all_of.h
@@ -0,0 +1,32 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/any_of.h b/app/src/main/cpp/libcxx/include/__algorithm/any_of.h
new file mode 100644
index 0000000..fe08828
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/any_of.h
@@ -0,0 +1,32 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/binary_search.h b/app/src/main/cpp/libcxx/include/__algorithm/binary_search.h
new file mode 100644
index 0000000..8f958c2
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/binary_search.h
@@ -0,0 +1,46 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__algorithm/lower_bound.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
+_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::value_type, _Tp>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_BINARY_SEARCH_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/clamp.h b/app/src/main/cpp/libcxx/include/__algorithm/clamp.h
new file mode 100644
index 0000000..30ddbdc
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/clamp.h
@@ -0,0 +1,46 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__assert>
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 14
+template
+_LIBCPP_NODISCARD_EXT inline
+_LIBCPP_INLINE_VISIBILITY constexpr
+const _Tp&
+clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi, _Compare __comp)
+{
+ _LIBCPP_ASSERT(!__comp(__hi, __lo), "Bad bounds passed to std::clamp");
+ return __comp(__v, __lo) ? __lo : __comp(__hi, __v) ? __hi : __v;
+
+}
+
+template
+_LIBCPP_NODISCARD_EXT inline
+_LIBCPP_INLINE_VISIBILITY constexpr
+const _Tp&
+clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi)
+{
+ return _VSTD::clamp(__v, __lo, __hi, __less<_Tp>());
+}
+#endif
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_CLAMP_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/comp.h b/app/src/main/cpp/libcxx/include/__algorithm/comp.h
new file mode 100644
index 0000000..af8eb7b
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/comp.h
@@ -0,0 +1,66 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+struct __equal_to {
+ template
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool operator()(const _T1& __x, const _T2& __y) const {
+ return __x == __y;
+ }
+};
+
+template
+struct __less
+{
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+ bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
+
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+ bool operator()(const _T1& __x, const _T2& __y) const {return __x < __y;}
+
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+ bool operator()(const _T2& __x, const _T1& __y) const {return __x < __y;}
+
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+ bool operator()(const _T2& __x, const _T2& __y) const {return __x < __y;}
+};
+
+template
+struct __less<_T1, _T1>
+{
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+ bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
+};
+
+template
+struct __less
+{
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+ bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
+};
+
+template
+struct __less<_T1, const _T1>
+{
+ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+ bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_COMP_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/comp_ref_type.h b/app/src/main/cpp/libcxx/include/__algorithm/comp_ref_type.h
new file mode 100644
index 0000000..f2338e1
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/comp_ref_type.h
@@ -0,0 +1,79 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+#include <__debug>
+#include <__utility/declval.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+struct __debug_less
+{
+ _Compare &__comp_;
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
+ __debug_less(_Compare& __c) : __comp_(__c) {}
+
+ template
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
+ bool operator()(const _Tp& __x, const _Up& __y)
+ {
+ bool __r = __comp_(__x, __y);
+ if (__r)
+ __do_compare_assert(0, __y, __x);
+ return __r;
+ }
+
+ template
+ _LIBCPP_CONSTEXPR_SINCE_CXX14
+ bool operator()(_Tp& __x, _Up& __y)
+ {
+ bool __r = __comp_(__x, __y);
+ if (__r)
+ __do_compare_assert(0, __y, __x);
+ return __r;
+ }
+
+ template
+ _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_DEBUG_ASSERT(!__comp_(__l, __r),
+ "Comparator does not induce a strict weak ordering");
+ (void)__l;
+ (void)__r;
+ }
+
+ template
+ _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.
+#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+template
+using __comp_ref_type = __debug_less<_Comp>;
+#else
+template
+using __comp_ref_type = _Comp&;
+#endif
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/copy.h b/app/src/main/cpp/libcxx/include/__algorithm/copy.h
new file mode 100644
index 0000000..193a6df
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/copy.h
@@ -0,0 +1,126 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/copy_move_common.h>
+#include <__algorithm/iterator_operations.h>
+#include <__algorithm/min.h>
+#include <__config>
+#include <__iterator/segmented_iterator.h>
+#include <__type_traits/common_type.h>
+#include <__utility/move.h>
+#include <__utility/pair.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter> __copy(_InIter, _Sent, _OutIter);
+
+template
+struct __copy_loop {
+ template
+ _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 ::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<_AlgPolicy>(_Traits::__local(__first), _Traits::__local(__last), std::move(__result));
+ return std::make_pair(__last, std::move(__iters.second));
+ }
+
+ __result = std::__copy<_AlgPolicy>(_Traits::__local(__first), _Traits::__end(__sfirst), std::move(__result)).second;
+ ++__sfirst;
+ while (__sfirst != __slast) {
+ __result =
+ std::__copy<_AlgPolicy>(_Traits::__begin(__sfirst), _Traits::__end(__sfirst), std::move(__result)).second;
+ ++__sfirst;
+ }
+ __result =
+ std::__copy<_AlgPolicy>(_Traits::__begin(__sfirst), _Traits::__local(__last), std::move(__result)).second;
+ return std::make_pair(__last, std::move(__result));
+ }
+
+ template ::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) {
+ 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 ::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
+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
+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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/copy_backward.h b/app/src/main/cpp/libcxx/include/__algorithm/copy_backward.h
new file mode 100644
index 0000000..bb2a432
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/copy_backward.h
@@ -0,0 +1,143 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/copy_move_common.h>
+#include <__algorithm/iterator_operations.h>
+#include <__algorithm/min.h>
+#include <__config>
+#include <__iterator/segmented_iterator.h>
+#include <__type_traits/common_type.h>
+#include <__type_traits/is_copy_constructible.h>
+#include <__utility/move.h>
+#include <__utility/pair.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 pair<_InIter, _OutIter>
+__copy_backward(_InIter __first, _Sent __last, _OutIter __result);
+
+template
+struct __copy_backward_loop {
+ template
+ _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 ::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 ::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) {
+ 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 ::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
+_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
+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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/copy_if.h b/app/src/main/cpp/libcxx/include/__algorithm/copy_if.h
new file mode 100644
index 0000000..a5938b8
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/copy_if.h
@@ -0,0 +1,39 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/copy_move_common.h b/app/src/main/cpp/libcxx/include/__algorithm/copy_move_common.h
new file mode 100644
index 0000000..b88c149
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/copy_move_common.h
@@ -0,0 +1,163 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/iterator_operations.h>
+#include <__algorithm/unwrap_iter.h>
+#include <__algorithm/unwrap_range.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+#include <__memory/pointer_traits.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/is_always_bitcastable.h>
+#include <__type_traits/is_constant_evaluated.h>
+#include <__type_traits/is_copy_constructible.h>
+#include <__type_traits/is_trivially_assignable.h>
+#include <__type_traits/is_trivially_copyable.h>
+#include <__type_traits/is_volatile.h>
+#include <__utility/move.h>
+#include <__utility/pair.h>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+// Type traits.
+
+template
+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
+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
+_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(__last - __first);
+ ::__builtin_memmove(__result, __first, __n * sizeof(_Out));
+
+ return std::make_pair(__last, __result + __n);
+}
+
+template
+_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(__last - __first);
+ __result -= __n;
+
+ ::__builtin_memmove(__result, __first, __n * sizeof(_Out));
+
+ return std::make_pair(__last, __result);
+}
+
+// Iterator unwrapping and dispatching to the correct overload.
+
+template
+struct __overload : _F1, _F2 {
+ using _F1::operator();
+ using _F2::operator();
+};
+
+template
+struct __can_rewrap : false_type {};
+
+template
+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 ::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 ::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
+struct __can_copy_without_conversion : false_type {};
+
+template
+struct __can_copy_without_conversion<
+ _IterOps,
+ _InValue,
+ _OutIter,
+ __enable_if_t >::value> > : true_type {};
+
+template
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX17 pair<_InIter, _OutIter>
+__dispatch_copy_or_move(_InIter __first, _Sent __last, _OutIter __out_first) {
+#ifdef _LIBCPP_COMPILER_GCC
+ // GCC doesn't support `__builtin_memmove` during constant evaluation.
+ if (__libcpp_is_constant_evaluated()) {
+ return std::__unwrap_and_dispatch<_NaiveAlgorithm>(std::move(__first), std::move(__last), std::move(__out_first));
+ }
+#else
+ // In Clang, `__builtin_memmove` only supports fully trivially copyable types (just having trivial copy assignment is
+ // insufficient). Also, conversions are not supported.
+ if (__libcpp_is_constant_evaluated()) {
+ using _InValue = typename _IterOps<_AlgPolicy>::template __value_type<_InIter>;
+ if (!is_trivially_copyable<_InValue>::value ||
+ !__can_copy_without_conversion<_IterOps<_AlgPolicy>, _InValue, _OutIter>::value) {
+ return std::__unwrap_and_dispatch<_NaiveAlgorithm>(std::move(__first), std::move(__last), std::move(__out_first));
+ }
+ }
+#endif // _LIBCPP_COMPILER_GCC
+
+ 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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/copy_n.h b/app/src/main/cpp/libcxx/include/__algorithm/copy_n.h
new file mode 100644
index 0000000..b08bbdf
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/copy_n.h
@@ -0,0 +1,67 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/copy.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+#include <__utility/convert_to_integral.h>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
+typename enable_if
+<
+ __is_cpp17_input_iterator<_InputIterator>::value &&
+ !__is_cpp17_random_access_iterator<_InputIterator>::value,
+ _OutputIterator
+>::type
+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
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
+typename enable_if
+<
+ __is_cpp17_random_access_iterator<_InputIterator>::value,
+ _OutputIterator
+>::type
+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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/count.h b/app/src/main/cpp/libcxx/include/__algorithm/count.h
new file mode 100644
index 0000000..6c8c7fd
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/count.h
@@ -0,0 +1,35 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
+ typename iterator_traits<_InputIterator>::difference_type
+ count(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
+ typename iterator_traits<_InputIterator>::difference_type __r(0);
+ for (; __first != __last; ++__first)
+ if (*__first == __value)
+ ++__r;
+ return __r;
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_COUNT_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/count_if.h b/app/src/main/cpp/libcxx/include/__algorithm/count_if.h
new file mode 100644
index 0000000..b96521f
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/count_if.h
@@ -0,0 +1,35 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/equal.h b/app/src/main/cpp/libcxx/include/__algorithm/equal.h
new file mode 100644
index 0000000..cf37f46
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/equal.h
@@ -0,0 +1,86 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__config>
+#include <__iterator/distance.h>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) {
+ for (; __first1 != __last1; ++__first1, (void)++__first2)
+ if (!__pred(*__first1, *__first2))
+ return false;
+ return true;
+}
+
+template
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 bool
+equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) {
+ return std::equal(__first1, __last1, __first2, __equal_to());
+}
+
+#if _LIBCPP_STD_VER > 11
+template
+inline _LIBCPP_INLINE_VISIBILITY _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
+inline _LIBCPP_INLINE_VISIBILITY _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;
+ return _VSTD::equal<_RandomAccessIterator1, _RandomAccessIterator2,
+ _BinaryPredicate&>(__first1, __last1, __first2, __pred);
+}
+
+template
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _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
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _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
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_EQUAL_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/equal_range.h b/app/src/main/cpp/libcxx/include/__algorithm/equal_range.h
new file mode 100644
index 0000000..2075b03
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/equal_range.h
@@ -0,0 +1,87 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__algorithm/half_positive.h>
+#include <__algorithm/iterator_operations.h>
+#include <__algorithm/lower_bound.h>
+#include <__algorithm/upper_bound.h>
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__iterator/advance.h>
+#include <__iterator/distance.h>
+#include <__iterator/iterator_traits.h>
+#include <__iterator/next.h>
+#include <__type_traits/is_callable.h>
+#include <__type_traits/is_copy_constructible.h>
+#include <__utility/move.h>
+#include <__utility/pair.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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_impl<_AlgPolicy>(__first, __mid, __value, __comp, __proj),
+ std::__upper_bound<_AlgPolicy>(++__mp1, __end, __value, __comp, __proj));
+ }
+ }
+ return pair<_Iter, _Iter>(__first, __first);
+}
+
+template
+_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
+_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::value_type, _Tp>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_EQUAL_RANGE_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/fill.h b/app/src/main/cpp/libcxx/include/__algorithm/fill.h
new file mode 100644
index 0000000..76cf4a1
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/fill.h
@@ -0,0 +1,52 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/fill_n.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_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
+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
+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
+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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/fill_n.h b/app/src/main/cpp/libcxx/include/__algorithm/fill_n.h
new file mode 100644
index 0000000..fe58c8d
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/fill_n.h
@@ -0,0 +1,45 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+#include <__iterator/iterator_traits.h>
+#include <__utility/convert_to_integral.h>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_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
+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
+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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/find.h b/app/src/main/cpp/libcxx/include/__algorithm/find.h
new file mode 100644
index 0000000..e51dc9b
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/find.h
@@ -0,0 +1,32 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _InputIterator
+find(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
+ for (; __first != __last; ++__first)
+ if (*__first == __value)
+ break;
+ return __first;
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_FIND_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/find_end.h b/app/src/main/cpp/libcxx/include/__algorithm/find_end.h
new file mode 100644
index 0000000..e2fee6b
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/find_end.h
@@ -0,0 +1,227 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/iterator_operations.h>
+#include <__algorithm/search.h>
+#include <__config>
+#include <__functional/identity.h>
+#include <__iterator/advance.h>
+#include <__iterator/iterator_traits.h>
+#include <__iterator/next.h>
+#include <__iterator/reverse_iterator.h>
+#include <__utility/pair.h>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_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
+_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
+_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
+_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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/find_first_of.h b/app/src/main/cpp/libcxx/include/__algorithm/find_first_of.h
new file mode 100644
index 0000000..12f0109
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/find_first_of.h
@@ -0,0 +1,52 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
+_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
+_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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/find_if.h b/app/src/main/cpp/libcxx/include/__algorithm/find_if.h
new file mode 100644
index 0000000..f4ef3ac
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/find_if.h
@@ -0,0 +1,32 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/find_if_not.h b/app/src/main/cpp/libcxx/include/__algorithm/find_if_not.h
new file mode 100644
index 0000000..96c159c
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/find_if_not.h
@@ -0,0 +1,32 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/for_each.h b/app/src/main/cpp/libcxx/include/__algorithm/for_each.h
new file mode 100644
index 0000000..6564f31
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/for_each.h
@@ -0,0 +1,32 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/for_each_n.h b/app/src/main/cpp/libcxx/include/__algorithm/for_each_n.h
new file mode 100644
index 0000000..38d204a
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/for_each_n.h
@@ -0,0 +1,43 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+#include <__utility/convert_to_integral.h>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 14
+
+template
+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
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_FOR_EACH_N_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/generate.h b/app/src/main/cpp/libcxx/include/__algorithm/generate.h
new file mode 100644
index 0000000..48e21b5
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/generate.h
@@ -0,0 +1,31 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/generate_n.h b/app/src/main/cpp/libcxx/include/__algorithm/generate_n.h
new file mode 100644
index 0000000..4525998
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/generate_n.h
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+#include <__utility/convert_to_integral.h>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/half_positive.h b/app/src/main/cpp/libcxx/include/__algorithm/half_positive.h
new file mode 100644
index 0000000..74aede2
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/half_positive.h
@@ -0,0 +1,49 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+// Perform division by two quickly for positive integers (llvm.org/PR39129)
+
+template
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+typename enable_if
+<
+ is_integral<_Integral>::value,
+ _Integral
+>::type
+__half_positive(_Integral __value)
+{
+ return static_cast<_Integral>(static_cast<__make_unsigned_t<_Integral> >(__value) / 2);
+}
+
+template
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+typename enable_if
+<
+ !is_integral<_Tp>::value,
+ _Tp
+>::type
+__half_positive(_Tp __value)
+{
+ return __value / 2;
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_HALF_POSITIVE_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/in_found_result.h b/app/src/main/cpp/libcxx/include/__algorithm/in_found_result.h
new file mode 100644
index 0000000..3134d6e
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/in_found_result.h
@@ -0,0 +1,49 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__concepts/convertible_to.h>
+#include <__config>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+#if _LIBCPP_STD_VER > 17
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace ranges {
+template
+struct in_found_result {
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
+ bool found;
+
+ template
+ requires convertible_to
+ _LIBCPP_HIDE_FROM_ABI constexpr operator in_found_result<_InIter2>() const & {
+ return {in, found};
+ }
+
+ template
+ 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 > 17
+
+#endif // _LIBCPP___ALGORITHM_IN_FOUND_RESULT_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/in_fun_result.h b/app/src/main/cpp/libcxx/include/__algorithm/in_fun_result.h
new file mode 100644
index 0000000..3cbb9e1
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/in_fun_result.h
@@ -0,0 +1,49 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__concepts/convertible_to.h>
+#include <__config>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17
+
+namespace ranges {
+template
+struct in_fun_result {
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
+ _LIBCPP_NO_UNIQUE_ADDRESS _Func1 fun;
+
+ template
+ requires convertible_to && convertible_to
+ _LIBCPP_HIDE_FROM_ABI constexpr operator in_fun_result<_InIter2, _Func2>() const & {
+ return {in, fun};
+ }
+
+ template
+ 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 > 17
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IN_FUN_RESULT_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/in_in_out_result.h b/app/src/main/cpp/libcxx/include/__algorithm/in_in_out_result.h
new file mode 100644
index 0000000..3e747be
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/in_in_out_result.h
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__concepts/convertible_to.h>
+#include <__config>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17
+
+namespace ranges {
+
+template
+struct in_in_out_result {
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in1;
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter2 in2;
+ _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out;
+
+ template
+ requires convertible_to
+ && convertible_to && convertible_to
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ operator in_in_out_result<_InIter3, _InIter4, _OutIter2>() const& {
+ return {in1, in2, out};
+ }
+
+ template
+ 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 > 17
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/in_in_result.h b/app/src/main/cpp/libcxx/include/__algorithm/in_in_result.h
new file mode 100644
index 0000000..2098c18
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/in_in_result.h
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__concepts/convertible_to.h>
+#include <__config>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17
+
+namespace ranges {
+
+template
+struct in_in_result {
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in1;
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter2 in2;
+
+ template
+ requires convertible_to && convertible_to
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ operator in_in_result<_InIter3, _InIter4>() const & {
+ return {in1, in2};
+ }
+
+ template
+ 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 > 17
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IN_IN_RESULT_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/in_out_out_result.h b/app/src/main/cpp/libcxx/include/__algorithm/in_out_out_result.h
new file mode 100644
index 0000000..4046eee
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/in_out_out_result.h
@@ -0,0 +1,54 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__concepts/convertible_to.h>
+#include <__config>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17
+
+namespace ranges {
+template
+struct in_out_out_result {
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
+ _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out1;
+ _LIBCPP_NO_UNIQUE_ADDRESS _OutIter2 out2;
+
+ template
+ requires convertible_to
+ && convertible_to && convertible_to
+ _LIBCPP_HIDE_FROM_ABI constexpr
+ operator in_out_out_result<_InIter2, _OutIter3, _OutIter4>() const& {
+ return {in, out1, out2};
+ }
+
+ template
+ 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 > 17
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IN_OUT_OUT_RESULT_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/in_out_result.h b/app/src/main/cpp/libcxx/include/__algorithm/in_out_result.h
new file mode 100644
index 0000000..7f5a027
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/in_out_result.h
@@ -0,0 +1,53 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__concepts/convertible_to.h>
+#include <__config>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17
+
+namespace ranges {
+
+template
+struct in_out_result {
+ _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
+ _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out;
+
+ template
+ requires convertible_to && convertible_to
+ _LIBCPP_HIDE_FROM_ABI
+ constexpr operator in_out_result<_InIter2, _OutIter2>() const & {
+ return {in, out};
+ }
+
+ template
+ 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 > 17
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IN_OUT_RESULT_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/includes.h b/app/src/main/cpp/libcxx/include/__algorithm/includes.h
new file mode 100644
index 0000000..cc39f27
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/includes.h
@@ -0,0 +1,75 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__iterator/iterator_traits.h>
+#include <__type_traits/is_callable.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
+_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
+_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::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_INCLUDES_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/inplace_merge.h b/app/src/main/cpp/libcxx/include/__algorithm/inplace_merge.h
new file mode 100644
index 0000000..5bbefc9
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/inplace_merge.h
@@ -0,0 +1,257 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__algorithm/iterator_operations.h>
+#include <__algorithm/lower_bound.h>
+#include <__algorithm/min.h>
+#include <__algorithm/move.h>
+#include <__algorithm/rotate.h>
+#include <__algorithm/upper_bound.h>
+#include <__config>
+#include <__functional/identity.h>
+#include <__iterator/advance.h>
+#include <__iterator/distance.h>
+#include <__iterator/iterator_traits.h>
+#include <__iterator/reverse_iterator.h>
+#include <__memory/destruct_n.h>
+#include <__memory/temporary_buffer.h>
+#include <__memory/unique_ptr.h>
+#include <__utility/pair.h>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+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
+ _LIBCPP_INLINE_VISIBILITY
+ bool operator()(const _T1& __x) {return !__p_(__x);}
+
+ template
+ _LIBCPP_INLINE_VISIBILITY
+ bool operator()(const _T1& __x, const _T2& __y) {return __p_(__y, __x);}
+};
+
+template
+_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
+_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 __h2(__buff, __d);
+ if (__len1 <= __len2)
+ {
+ value_type* __p = __buff;
+ for (_BidirectionalIterator __i = __first; __i != __middle; __d.template __incr(), (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(), (void) ++__i, (void) ++__p)
+ ::new ((void*)__p) value_type(_IterOps<_AlgPolicy>::__iter_move(__i));
+ typedef __unconstrained_reverse_iterator<_BidirectionalIterator> _RBi;
+ typedef __unconstrained_reverse_iterator _Rv;
+ typedef __invert<_Compare> _Inverted;
+ std::__half_inplace_merge<_AlgPolicy>(_Rv(__p), _Rv(__buff),
+ _RBi(__middle), _RBi(__first),
+ _RBi(__last), _Inverted(__comp));
+ }
+}
+
+template
+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
+_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 __buf = _VSTD::get_temporary_buffer(__buf_size);
+_LIBCPP_SUPPRESS_DEPRECATED_POP
+ unique_ptr __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
+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
+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::value_type>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
+
+#endif // _LIBCPP___ALGORITHM_INPLACE_MERGE_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/is_heap.h b/app/src/main/cpp/libcxx/include/__algorithm/is_heap.h
new file mode 100644
index 0000000..2dcb4a2
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/is_heap.h
@@ -0,0 +1,44 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__algorithm/is_heap_until.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
+_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::value_type>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IS_HEAP_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/is_heap_until.h b/app/src/main/cpp/libcxx/include/__algorithm/is_heap_until.h
new file mode 100644
index 0000000..6ed4cb2
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/is_heap_until.h
@@ -0,0 +1,66 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
+_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
+_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::value_type>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IS_HEAP_UNTIL_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/is_partitioned.h b/app/src/main/cpp/libcxx/include/__algorithm/is_partitioned.h
new file mode 100644
index 0000000..ab59d3c
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/is_partitioned.h
@@ -0,0 +1,38 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/is_permutation.h b/app/src/main/cpp/libcxx/include/__algorithm/is_permutation.h
new file mode 100644
index 0000000..0054456
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/is_permutation.h
@@ -0,0 +1,238 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/iterator_operations.h>
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__iterator/concepts.h>
+#include <__iterator/distance.h>
+#include <__iterator/iterator_traits.h>
+#include <__iterator/next.h>
+#include <__utility/move.h>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+struct _ConstTimeDistance : false_type {};
+
+#if _LIBCPP_STD_VER > 17
+
+template
+struct _ConstTimeDistance<_Iter1, _Sent1, _Iter2, _Sent2, __enable_if_t<
+ sized_sentinel_for<_Sent1, _Iter1> &&
+ sized_sentinel_for<_Sent2, _Iter2>
+>> : true_type {};
+
+#else
+
+template
+struct _ConstTimeDistance<_Iter1, _Iter1, _Iter2, _Iter2, __enable_if_t<
+ is_same::iterator_category, random_access_iterator_tag>::value &&
+ is_same::iterator_category, random_access_iterator_tag>::value
+> > : true_type {};
+
+#endif // _LIBCPP_STD_VER > 17
+
+// Internal functions
+
+// For each element in [f1, l1) see if there are the same number of equal elements in [f2, l2)
+template
+_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
+_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
+_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
+_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
+_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
+_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
+_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 _LIBCPP_STD_VER > 11
+
+// 2+2 iterators
+template
+_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
+_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 > 11
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IS_PERMUTATION_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/is_sorted.h b/app/src/main/cpp/libcxx/include/__algorithm/is_sorted.h
new file mode 100644
index 0000000..bf44f45
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/is_sorted.h
@@ -0,0 +1,44 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__algorithm/is_sorted_until.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
+_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::value_type>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IS_SORTED_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/is_sorted_until.h b/app/src/main/cpp/libcxx/include/__algorithm/is_sorted_until.h
new file mode 100644
index 0000000..b668300
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/is_sorted_until.h
@@ -0,0 +1,56 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
+_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
+_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::value_type>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_IS_SORTED_UNTIL_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/iter_swap.h b/app/src/main/cpp/libcxx/include/__algorithm/iter_swap.h
new file mode 100644
index 0000000..44422b5
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/iter_swap.h
@@ -0,0 +1,32 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__config>
+#include <__utility/declval.h>
+#include <__utility/swap.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+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
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/iterator_operations.h b/app/src/main/cpp/libcxx/include/__algorithm/iterator_operations.h
new file mode 100644
index 0000000..bd3e6f1
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/iterator_operations.h
@@ -0,0 +1,175 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/iter_swap.h>
+#include <__algorithm/ranges_iterator_concept.h>
+#include <__config>
+#include <__iterator/advance.h>
+#include <__iterator/distance.h>
+#include <__iterator/incrementable_traits.h>
+#include <__iterator/iter_move.h>
+#include <__iterator/iter_swap.h>
+#include <__iterator/iterator_traits.h>
+#include <__iterator/next.h>
+#include <__iterator/prev.h>
+#include <__iterator/readable_traits.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/is_reference.h>
+#include <__type_traits/is_same.h>
+#include <__type_traits/remove_cvref.h>
+#include <__utility/declval.h>
+#include <__utility/forward.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template struct _IterOps;
+
+#if _LIBCPP_STD_VER > 17
+struct _RangeAlgPolicy {};
+
+template <>
+struct _IterOps<_RangeAlgPolicy> {
+
+ template
+ using __value_type = iter_value_t<_Iter>;
+
+ template
+ using __iterator_category = ranges::__iterator_concept<_Iter>;
+
+ template
+ 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
+
+struct _ClassicAlgPolicy {};
+
+template <>
+struct _IterOps<_ClassicAlgPolicy> {
+
+ template
+ using __value_type = typename iterator_traits<_Iter>::value_type;
+
+ template
+ using __iterator_category = typename iterator_traits<_Iter>::iterator_category;
+
+ template
+ using __difference_type = typename iterator_traits<_Iter>::difference_type;
+
+ // advance
+ template
+ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
+ static void advance(_Iter& __iter, _Distance __count) {
+ std::advance(__iter, __count);
+ }
+
+ // distance
+ template
+ _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
+ using __deref_t = decltype(*std::declval<_Iter&>());
+
+ template
+ using __move_t = decltype(std::move(*std::declval<_Iter&>()));
+
+ template
+ _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::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
+ _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.
+ __enable_if_t<
+ is_reference<__deref_t<_Iter> >::value,
+ __move_t<_Iter> >
+ __iter_move(_Iter&& __i) {
+ __validate_iter_reference<_Iter>();
+
+ return std::move(*std::forward<_Iter>(__i));
+ }
+
+ template
+ _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.
+ __enable_if_t<
+ !is_reference<__deref_t<_Iter> >::value,
+ __deref_t<_Iter> >
+ __iter_move(_Iter&& __i) {
+ __validate_iter_reference<_Iter>();
+
+ return *std::forward<_Iter>(__i);
+ }
+
+ // iter_swap
+ template
+ _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
+ _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
+ _Iterator next(_Iterator, _Iterator __last) {
+ return __last;
+ }
+
+ template
+ _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
+ _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
+ _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_SINCE_CXX14
+ void __advance_to(_Iter& __first, _Iter __last) {
+ __first = __last;
+ }
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_ITERATOR_OPERATIONS_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/lexicographical_compare.h b/app/src/main/cpp/libcxx/include/__algorithm/lexicographical_compare.h
new file mode 100644
index 0000000..0a13c5d
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/lexicographical_compare.h
@@ -0,0 +1,62 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
+_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
+_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::value_type,
+ typename iterator_traits<_InputIterator2>::value_type>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/lower_bound.h b/app/src/main/cpp/libcxx/include/__algorithm/lower_bound.h
new file mode 100644
index 0000000..2648982
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/lower_bound.h
@@ -0,0 +1,68 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/half_positive.h>
+#include <__algorithm/iterator_operations.h>
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__iterator/advance.h>
+#include <__iterator/distance.h>
+#include <__iterator/iterator_traits.h>
+#include <__type_traits/is_callable.h>
+#include <__type_traits/remove_reference.h>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
+_Iter __lower_bound_impl(_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
+_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_impl<_ClassicAlgPolicy>(__first, __last, __value, __comp, __proj);
+}
+
+template
+_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::value_type, _Tp>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_LOWER_BOUND_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/make_heap.h b/app/src/main/cpp/libcxx/include/__algorithm/make_heap.h
new file mode 100644
index 0000000..d66cfe2
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/make_heap.h
@@ -0,0 +1,56 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__algorithm/iterator_operations.h>
+#include <__algorithm/sift_down.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+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
+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
+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::value_type>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_MAKE_HEAP_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/make_projected.h b/app/src/main/cpp/libcxx/include/__algorithm/make_projected.h
new file mode 100644
index 0000000..87d4d59
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/make_projected.h
@@ -0,0 +1,126 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__concepts/same_as.h>
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__type_traits/decay.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/integral_constant.h>
+#include <__type_traits/is_member_pointer.h>
+#include <__type_traits/is_same.h>
+#include <__utility/declval.h>
+#include <__utility/forward.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+struct _ProjectedPred {
+ _Pred& __pred; // Can be a unary or a binary predicate.
+ _Proj& __proj;
+
+ _LIBCPP_CONSTEXPR _ProjectedPred(_Pred& __pred_arg, _Proj& __proj_arg) : __pred(__pred_arg), __proj(__proj_arg) {}
+
+ template
+ typename __invoke_of<_Pred&,
+ decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_Tp>()))
+ >::type
+ _LIBCPP_CONSTEXPR operator()(_Tp&& __v) const {
+ return std::__invoke(__pred, std::__invoke(__proj, std::forward<_Tp>(__v)));
+ }
+
+ template
+ 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 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
+struct __can_use_pristine_comp : false_type {};
+
+template
+struct __can_use_pristine_comp<_Pred, _Proj, __enable_if_t<
+ !is_member_pointer::type>::value && (
+#if _LIBCPP_STD_VER > 17
+ is_same::type, identity>::value ||
+#endif
+ is_same::type, __identity>::value
+ )
+> > : true_type {};
+
+template
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static
+__enable_if_t<
+ !__can_use_pristine_comp<_Pred, _Proj>::value,
+ _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
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static
+__enable_if_t<
+ __can_use_pristine_comp<_Pred, _Proj>::value,
+ _Pred&
+>
+__make_projected(_Pred& __pred, _Proj&) {
+ return __pred;
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+namespace ranges {
+
+template
+_LIBCPP_HIDE_FROM_ABI constexpr static
+decltype(auto) __make_projected_comp(_Comp& __comp, _Proj1& __proj1, _Proj2& __proj2) {
+ if constexpr (same_as, identity> && same_as, identity> &&
+ !is_member_pointer_v>) {
+ // 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(__lhs)),
+ std::invoke(__proj2, std::forward(__rhs)));
+ };
+ }
+}
+
+} // namespace ranges
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP_STD_VER > 17
+
+#endif // _LIBCPP___ALGORITHM_MAKE_PROJECTED_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/max.h b/app/src/main/cpp/libcxx/include/__algorithm/max.h
new file mode 100644
index 0000000..a08a3fc
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/max.h
@@ -0,0 +1,71 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__algorithm/max_element.h>
+#include <__config>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_LIBCPP_NODISCARD_EXT inline
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+const _Tp&
+max(const _Tp& __a, const _Tp& __b, _Compare __comp)
+{
+ return __comp(__a, __b) ? __b : __a;
+}
+
+template
+_LIBCPP_NODISCARD_EXT inline
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+const _Tp&
+max(const _Tp& __a, const _Tp& __b)
+{
+ return _VSTD::max(__a, __b, __less<_Tp>());
+}
+
+#ifndef _LIBCPP_CXX03_LANG
+
+template
+_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
+_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<_Tp>());
+}
+
+#endif // _LIBCPP_CXX03_LANG
+
+_LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
+
+#endif // _LIBCPP___ALGORITHM_MAX_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/max_element.h b/app/src/main/cpp/libcxx/include/__algorithm/max_element.h
new file mode 100644
index 0000000..6ac3106
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/max_element.h
@@ -0,0 +1,57 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
+__max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
+{
+ static_assert(__is_cpp17_forward_iterator<_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
+_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
+_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::value_type>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_MAX_ELEMENT_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/merge.h b/app/src/main/cpp/libcxx/include/__algorithm/merge.h
new file mode 100644
index 0000000..e54e430
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/merge.h
@@ -0,0 +1,70 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__algorithm/copy.h>
+#include <__config>
+#include <__iterator/iterator_traits.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_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
+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
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20
+_OutputIterator
+merge(_InputIterator1 __first1, _InputIterator1 __last1,
+ _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
+{
+ typedef typename iterator_traits<_InputIterator1>::value_type __v1;
+ typedef typename iterator_traits<_InputIterator2>::value_type __v2;
+ return _VSTD::merge(__first1, __last1, __first2, __last2, __result, __less<__v1, __v2>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_MERGE_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/min.h b/app/src/main/cpp/libcxx/include/__algorithm/min.h
new file mode 100644
index 0000000..2882485
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/min.h
@@ -0,0 +1,71 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__algorithm/min_element.h>
+#include <__config>
+#include
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+_LIBCPP_NODISCARD_EXT inline
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+const _Tp&
+min(const _Tp& __a, const _Tp& __b, _Compare __comp)
+{
+ return __comp(__b, __a) ? __b : __a;
+}
+
+template
+_LIBCPP_NODISCARD_EXT inline
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
+const _Tp&
+min(const _Tp& __a, const _Tp& __b)
+{
+ return _VSTD::min(__a, __b, __less<_Tp>());
+}
+
+#ifndef _LIBCPP_CXX03_LANG
+
+template
+_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
+_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<_Tp>());
+}
+
+#endif // _LIBCPP_CXX03_LANG
+
+_LIBCPP_END_NAMESPACE_STD
+
+_LIBCPP_POP_MACROS
+
+#endif // _LIBCPP___ALGORITHM_MIN_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/min_element.h b/app/src/main/cpp/libcxx/include/__algorithm/min_element.h
new file mode 100644
index 0000000..c0706fe
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/min_element.h
@@ -0,0 +1,70 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__algorithm/comp.h>
+#include <__algorithm/comp_ref_type.h>
+#include <__config>
+#include <__functional/identity.h>
+#include <__functional/invoke.h>
+#include <__iterator/iterator_traits.h>
+#include <__type_traits/is_callable.h>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template
+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
+_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
+_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _ForwardIterator
+min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
+{
+ static_assert(__is_cpp17_forward_iterator<_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
+_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::value_type>());
+}
+
+_LIBCPP_END_NAMESPACE_STD
+
+#endif // _LIBCPP___ALGORITHM_MIN_ELEMENT_H
diff --git a/app/src/main/cpp/libcxx/include/__algorithm/min_max_result.h b/app/src/main/cpp/libcxx/include/__algorithm/min_max_result.h
new file mode 100644
index 0000000..4be3999
--- /dev/null
+++ b/app/src/main/cpp/libcxx/include/__algorithm/min_max_result.h
@@ -0,0 +1,56 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.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
+
+#include <__concepts/convertible_to.h>
+#include <__config>
+#include <__utility/move.h>
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+# pragma GCC system_header
+#endif
+
+_LIBCPP_PUSH_MACROS
+#include <__undef_macros>
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+#if _LIBCPP_STD_VER > 17
+
+namespace ranges {
+
+template
+struct min_max_result {
+ _LIBCPP_NO_UNIQUE_ADDRESS _T1 min;
+ _LIBCPP_NO_UNIQUE_ADDRESS _T1 max;
+
+ template
+ requires convertible_to