+#define VM_MAP_COPYIN_SRC_DESTROY 0x00000001
+#define VM_MAP_COPYIN_USE_MAXPROT 0x00000002
+#define VM_MAP_COPYIN_ENTRY_LIST 0x00000004
+#define VM_MAP_COPYIN_PRESERVE_PURGEABLE 0x00000008
+#define VM_MAP_COPYIN_ALL_FLAGS 0x0000000F
+extern kern_return_t vm_map_copyin_internal(
+ vm_map_t src_map,
+ vm_map_address_t src_addr,
+ vm_map_size_t len,
+ int flags,
+ vm_map_copy_t *copy_result); /* OUT */
+
+extern kern_return_t vm_map_copy_extract(
+ vm_map_t src_map,
+ vm_map_address_t src_addr,
+ vm_map_size_t len,
+ vm_map_copy_t *copy_result, /* OUT */
+ vm_prot_t *cur_prot, /* OUT */
+ vm_prot_t *max_prot);
+
+
+extern void vm_map_disable_NX(
+ vm_map_t map);
+
+extern void vm_map_disallow_data_exec(
+ vm_map_t map);
+
+extern void vm_map_set_64bit(
+ vm_map_t map);
+
+extern void vm_map_set_32bit(
+ vm_map_t map);
+
+extern void vm_map_set_jumbo(
+ vm_map_t map);
+
+extern boolean_t vm_map_has_hard_pagezero(
+ vm_map_t map,
+ vm_map_offset_t pagezero_size);
+extern void vm_commit_pagezero_status(vm_map_t tmap);
+
+#ifdef __arm__
+static inline boolean_t vm_map_is_64bit(__unused vm_map_t map) { return 0; }
+#else
+extern boolean_t vm_map_is_64bit(
+ vm_map_t map);
+#endif
+
+
+extern kern_return_t vm_map_raise_max_offset(
+ vm_map_t map,
+ vm_map_offset_t new_max_offset);
+
+extern kern_return_t vm_map_raise_min_offset(
+ vm_map_t map,
+ vm_map_offset_t new_min_offset);
+#if __x86_64__
+extern void vm_map_set_high_start(
+ vm_map_t map,
+ vm_map_offset_t high_start);
+#endif /* __x86_64__ */
+
+extern vm_map_offset_t vm_compute_max_offset(
+ boolean_t is64);
+
+extern void vm_map_get_max_aslr_slide_section(
+ vm_map_t map,
+ int64_t *max_sections,
+ int64_t *section_size);
+
+extern uint64_t vm_map_get_max_aslr_slide_pages(
+ vm_map_t map);
+
+extern uint64_t vm_map_get_max_loader_aslr_slide_pages(
+ vm_map_t map);
+
+extern void vm_map_set_user_wire_limit(
+ vm_map_t map,
+ vm_size_t limit);
+
+extern void vm_map_switch_protect(
+ vm_map_t map,
+ boolean_t val);
+
+extern void vm_map_iokit_mapped_region(
+ vm_map_t map,
+ vm_size_t bytes);
+
+extern void vm_map_iokit_unmapped_region(
+ vm_map_t map,
+ vm_size_t bytes);
+
+
+extern boolean_t first_free_is_valid(vm_map_t);
+
+extern int vm_map_page_shift(
+ vm_map_t map);
+
+extern vm_map_offset_t vm_map_page_mask(
+ vm_map_t map);
+
+extern int vm_map_page_size(
+ vm_map_t map);
+
+extern vm_map_offset_t vm_map_round_page_mask(
+ vm_map_offset_t offset,
+ vm_map_offset_t mask);
+
+extern vm_map_offset_t vm_map_trunc_page_mask(
+ vm_map_offset_t offset,
+ vm_map_offset_t mask);
+
+extern boolean_t vm_map_page_aligned(
+ vm_map_offset_t offset,
+ vm_map_offset_t mask);
+
+#ifdef XNU_KERNEL_PRIVATE
+extern kern_return_t vm_map_page_info(
+ vm_map_t map,
+ vm_map_offset_t offset,
+ vm_page_info_flavor_t flavor,
+ vm_page_info_t info,
+ mach_msg_type_number_t *count);
+extern kern_return_t vm_map_page_range_info_internal(
+ vm_map_t map,
+ vm_map_offset_t start_offset,
+ vm_map_offset_t end_offset,
+ vm_page_info_flavor_t flavor,
+ vm_page_info_t info,
+ mach_msg_type_number_t *count);
+#endif /* XNU_KERNEL_PRIVATE */
+
+
+#ifdef MACH_KERNEL_PRIVATE
+