text:
/*
 * IDENTIFICATION:
 * stub generated Wed Nov 23 13:02:00 2016
 * with a MiG generated by bootstrap_cmds-96.20.2
 * OPTIONS:
 */

/* Module iokit */

#define	__MIG_check__Request__iokit_subsystem__ 1

#include <string.h>
#include <mach/ndr.h>
#include <mach/boolean.h>
#include <mach/kern_return.h>
#include <mach/notify.h>
#include <mach/mach_types.h>
#include <mach/message.h>
#include <mach/mig_errors.h>
#include <mach/port.h>

/* BEGIN VOUCHER CODE */

#ifndef KERNEL
#if defined(__has_include)
#if __has_include(<mach/mig_voucher_support.h>)
#ifndef USING_VOUCHERS
#define USING_VOUCHERS
#endif
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
#define __VOUCHER_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
	extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
#endif // __has_include(<mach/mach_voucher_types.h>)
#endif // __has_include
#endif // !KERNEL

/* END VOUCHER CODE */

/* BEGIN MIG_STRNCPY_ZEROFILL CODE */

#if defined(__has_include)
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
#ifndef USING_MIG_STRNCPY_ZEROFILL
#define USING_MIG_STRNCPY_ZEROFILL
#endif
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
#ifdef __cplusplus
extern "C" {
#endif
	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
#endif /* __has_include */

/* END MIG_STRNCPY_ZEROFILL CODE */

#include <mach/std_types.h>
#include <mach/mig.h>
#include <mach/mig.h>
#include <mach/mach_types.h>
#include <mach/mach_types.h>
#include <device/device_types.h>

#ifndef	mig_internal
#define	mig_internal	static __inline__
#endif	/* mig_internal */

#ifndef	mig_external
#define mig_external
#endif	/* mig_external */

#if	!defined(__MigTypeCheck) && defined(TypeCheck)
#define	__MigTypeCheck		TypeCheck	/* Legacy setting */
#endif	/* !defined(__MigTypeCheck) */

#if	!defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
#define	__MigKernelSpecificCode	_MIG_KERNEL_SPECIFIC_CODE_	/* Legacy setting */
#endif	/* !defined(__MigKernelSpecificCode) */

#ifndef	LimitCheck
#define	LimitCheck 0
#endif	/* LimitCheck */

#ifndef	min
#define	min(a,b)  ( ((a) < (b))? (a): (b) )
#endif	/* min */

#if !defined(_WALIGN_)
#define _WALIGN_(x) (((x) + 3) & ~3)
#endif /* !defined(_WALIGN_) */

#if !defined(_WALIGNSZ_)
#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
#endif /* !defined(_WALIGNSZ_) */

#ifndef	UseStaticTemplates
#define	UseStaticTemplates	0
#endif	/* UseStaticTemplates */

#ifndef	__DeclareRcvRpc
#define	__DeclareRcvRpc(_NUM_, _NAME_)
#endif	/* __DeclareRcvRpc */

#ifndef	__BeforeRcvRpc
#define	__BeforeRcvRpc(_NUM_, _NAME_)
#endif	/* __BeforeRcvRpc */

#ifndef	__AfterRcvRpc
#define	__AfterRcvRpc(_NUM_, _NAME_)
#endif	/* __AfterRcvRpc */

#ifndef	__DeclareRcvSimple
#define	__DeclareRcvSimple(_NUM_, _NAME_)
#endif	/* __DeclareRcvSimple */

#ifndef	__BeforeRcvSimple
#define	__BeforeRcvSimple(_NUM_, _NAME_)
#endif	/* __BeforeRcvSimple */

#ifndef	__AfterRcvSimple
#define	__AfterRcvSimple(_NUM_, _NAME_)
#endif	/* __AfterRcvSimple */

#define novalue void

#define msgh_request_port	msgh_local_port
#define MACH_MSGH_BITS_REQUEST(bits)	MACH_MSGH_BITS_LOCAL(bits)
#define msgh_reply_port		msgh_remote_port
#define MACH_MSGH_BITS_REPLY(bits)	MACH_MSGH_BITS_REMOTE(bits)

#define MIG_RETURN_ERROR(X, code)	{\
				((mig_reply_error_t *)X)->RetCode = code;\
				((mig_reply_error_t *)X)->NDR = NDR_record;\
				return;\
				}

/* typedefs for all requests */

#ifndef __Request__iokit_subsystem__defined
#define __Request__iokit_subsystem__defined

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_object_get_class_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t classNameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t classNameCnt;
		char className[128];
	} __Request__io_object_conforms_to_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_iterator_next_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_iterator_reset_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
		mach_msg_type_number_t matchingCnt;
		char matching[512];
	} __Request__io_service_get_matching_services_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t property_nameCnt;
		char property_name[128];
	} __Request__io_registry_entry_get_property_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		uint32_t options;
	} __Request__io_registry_create_iterator_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_registry_iterator_enter_entry_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_registry_iterator_exit_entry_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t pathOffset; /* MiG doesn't use it */
		mach_msg_type_number_t pathCnt;
		char path[512];
	} __Request__io_registry_entry_from_path_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_registry_entry_get_name_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_registry_entry_get_properties_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t property_nameCnt;
		char property_name[128];
		mach_msg_type_number_t dataCnt;
	} __Request__io_registry_entry_get_property_bytes_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
	} __Request__io_registry_entry_get_child_iterator_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
	} __Request__io_registry_entry_get_parent_iterator_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_service_close_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_connect_get_service_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t connect_to;
		/* end of the kernel processed data */
	} __Request__io_connect_add_client_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t properties;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t propertiesCnt;
	} __Request__io_connect_set_properties_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
	} __Request__io_registry_entry_get_path_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_registry_get_root_entry_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t properties;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t propertiesCnt;
	} __Request__io_registry_entry_set_properties_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
	} __Request__io_registry_entry_in_plane_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_object_get_retain_count_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_service_get_busy_state_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_timespec_t wait_time;
	} __Request__io_service_wait_quiet_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		uint32_t options;
	} __Request__io_registry_entry_create_iterator_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_iterator_is_valid_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t inData;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		uint32_t flag;
		mach_msg_type_number_t inDataCnt;
	} __Request__io_catalog_send_data_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t flag;
		mach_msg_type_number_t nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t nameCnt;
		char name[128];
	} __Request__io_catalog_terminate_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t flag;
	} __Request__io_catalog_get_data_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_catalog_get_gen_count_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t nameCnt;
		char name[128];
	} __Request__io_catalog_module_loaded_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t flag;
	} __Request__io_catalog_reset_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t options;
	} __Request__io_service_request_probe_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
	} __Request__io_registry_entry_get_name_in_plane_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
		mach_msg_type_number_t matchingCnt;
		char matching[512];
	} __Request__io_service_match_property_table_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		natural_t notification_type;
	} __Request__io_connect_get_notification_semaphore_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
	} __Request__io_registry_entry_get_location_in_plane_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t property_nameCnt;
		char property_name[128];
		uint32_t options;
	} __Request__io_registry_entry_get_property_recursively_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_service_get_state_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t matching;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
	} __Request__io_service_get_matching_services_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t matching;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
	} __Request__io_service_match_property_table_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t obj_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t obj_nameCnt;
		char obj_name[128];
	} __Request__io_object_get_superclass_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t obj_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t obj_nameCnt;
		char obj_name[128];
	} __Request__io_object_get_bundle_identifier_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t owningTask;
		mach_msg_ool_descriptor_t properties;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		uint32_t connect_type;
		NDR_record_t ndr;
		mach_msg_type_number_t propertiesCnt;
	} __Request__io_service_open_extended_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t into_task;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		uint32_t memory_type;
		mach_vm_address_t address;
		mach_vm_size_t size;
		uint32_t flags;
	} __Request__io_connect_map_memory_into_task_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t from_task;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		uint32_t memory_type;
		mach_vm_address_t address;
	} __Request__io_connect_unmap_memory_from_task_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t selector;
		mach_msg_type_number_t scalar_inputCnt;
		io_user_scalar_t scalar_input[16];
		mach_msg_type_number_t inband_inputCnt;
		char inband_input[4096];
		mach_vm_address_t ool_input;
		mach_vm_size_t ool_input_size;
		mach_msg_type_number_t inband_outputCnt;
		mach_msg_type_number_t scalar_outputCnt;
		mach_vm_address_t ool_output;
		mach_vm_size_t ool_output_size;
	} __Request__io_connect_method_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t wake_port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t referenceCnt;
		io_user_reference_t reference[8];
		uint32_t selector;
		mach_msg_type_number_t scalar_inputCnt;
		io_user_scalar_t scalar_input[16];
		mach_msg_type_number_t inband_inputCnt;
		char inband_input[4096];
		mach_vm_address_t ool_input;
		mach_vm_size_t ool_input_size;
		mach_msg_type_number_t inband_outputCnt;
		mach_msg_type_number_t scalar_outputCnt;
		mach_vm_address_t ool_output;
		mach_vm_size_t ool_output_size;
	} __Request__io_connect_async_method_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		uint32_t notification_type;
		io_user_reference_t reference;
	} __Request__io_connect_set_notification_port_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t wake_port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t notification_typeCnt;
		char notification_type[128];
		mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
		mach_msg_type_number_t matchingCnt;
		char matching[512];
		mach_msg_type_number_t referenceCnt;
		io_user_reference_t reference[8];
	} __Request__io_service_add_notification_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t wake_port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t type_of_interestOffset; /* MiG doesn't use it */
		mach_msg_type_number_t type_of_interestCnt;
		char type_of_interest[128];
		mach_msg_type_number_t referenceCnt;
		io_user_reference_t reference[8];
	} __Request__io_service_add_interest_notification_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t matching;
		mach_msg_port_descriptor_t wake_port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t notification_typeCnt;
		char notification_type[128];
		mach_msg_type_number_t matchingCnt;
		mach_msg_type_number_t referenceCnt;
		io_user_reference_t reference[8];
	} __Request__io_service_add_notification_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_registry_entry_get_registry_entry_id_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t selector;
		mach_msg_type_number_t scalar_inputCnt;
		io_user_scalar_t scalar_input[16];
		mach_msg_type_number_t inband_inputCnt;
		char inband_input[4096];
		mach_vm_address_t ool_input;
		mach_vm_size_t ool_input_size;
		mach_msg_type_number_t inband_outputCnt;
		mach_msg_type_number_t scalar_outputCnt;
	} __Request__io_connect_method_var_output_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
		mach_msg_type_number_t matchingCnt;
		char matching[512];
	} __Request__io_service_get_matching_service_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t matching;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
	} __Request__io_service_get_matching_service_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_service_get_authorization_id_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint64_t authorization_id;
	} __Request__io_service_set_authorization_id_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_server_version_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
	} __Request__io_registry_entry_get_properties_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t property_nameCnt;
		char property_name[128];
		uint32_t options;
	} __Request__io_registry_entry_get_property_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
		char matching[4096];
	} __Request__io_service_get_matching_service_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
		char matching[4096];
	} __Request__io_service_get_matching_services_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
		char matching[4096];
	} __Request__io_service_match_property_table_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t wake_port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t notification_typeCnt;
		char notification_type[128];
		mach_msg_type_number_t matchingCnt;
		char matching[4096];
		mach_msg_type_number_t referenceCnt;
		io_user_reference_t reference[8];
	} __Request__io_service_add_notification_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
	} __Request__io_registry_entry_get_path_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t path_ool;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t pathOffset; /* MiG doesn't use it */
		mach_msg_type_number_t pathCnt;
		char path[4096];
		mach_msg_type_number_t path_oolCnt;
	} __Request__io_registry_entry_from_path_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
#endif /* !__Request__iokit_subsystem__defined */

/* typedefs for all replies */

#ifndef __Reply__iokit_subsystem__defined
#define __Reply__iokit_subsystem__defined

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		mach_msg_type_number_t classNameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t classNameCnt;
		char className[128];
	} __Reply__io_object_get_class_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		boolean_t conforms;
	} __Reply__io_object_conforms_to_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t object;
		/* end of the kernel processed data */
	} __Reply__io_iterator_next_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_iterator_reset_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t existing;
		/* end of the kernel processed data */
	} __Reply__io_service_get_matching_services_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t properties;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t propertiesCnt;
	} __Reply__io_registry_entry_get_property_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t iterator;
		/* end of the kernel processed data */
	} __Reply__io_registry_create_iterator_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_registry_iterator_enter_entry_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_registry_iterator_exit_entry_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t registry_entry;
		/* end of the kernel processed data */
	} __Reply__io_registry_entry_from_path_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		mach_msg_type_number_t nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t nameCnt;
		char name[128];
	} __Reply__io_registry_entry_get_name_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t properties;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t propertiesCnt;
	} __Reply__io_registry_entry_get_properties_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		mach_msg_type_number_t dataCnt;
		char data[4096];
	} __Reply__io_registry_entry_get_property_bytes_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t iterator;
		/* end of the kernel processed data */
	} __Reply__io_registry_entry_get_child_iterator_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t iterator;
		/* end of the kernel processed data */
	} __Reply__io_registry_entry_get_parent_iterator_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_service_close_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t service;
		/* end of the kernel processed data */
	} __Reply__io_connect_get_service_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_connect_add_client_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		kern_return_t result;
	} __Reply__io_connect_set_properties_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		mach_msg_type_number_t pathOffset; /* MiG doesn't use it */
		mach_msg_type_number_t pathCnt;
		char path[512];
	} __Reply__io_registry_entry_get_path_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t root;
		/* end of the kernel processed data */
	} __Reply__io_registry_get_root_entry_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		kern_return_t result;
	} __Reply__io_registry_entry_set_properties_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		boolean_t inPlane;
	} __Reply__io_registry_entry_in_plane_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		uint32_t retainCount;
	} __Reply__io_object_get_retain_count_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		uint32_t busyState;
	} __Reply__io_service_get_busy_state_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_service_wait_quiet_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t iterator;
		/* end of the kernel processed data */
	} __Reply__io_registry_entry_create_iterator_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		boolean_t is_valid;
	} __Reply__io_iterator_is_valid_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		kern_return_t result;
	} __Reply__io_catalog_send_data_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_catalog_terminate_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t outData;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t outDataCnt;
	} __Reply__io_catalog_get_data_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		uint32_t genCount;
	} __Reply__io_catalog_get_gen_count_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_catalog_module_loaded_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_catalog_reset_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_service_request_probe_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		mach_msg_type_number_t nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t nameCnt;
		char name[128];
	} __Reply__io_registry_entry_get_name_in_plane_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		boolean_t matches;
	} __Reply__io_service_match_property_table_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t semaphore;
		/* end of the kernel processed data */
	} __Reply__io_connect_get_notification_semaphore_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		mach_msg_type_number_t locationOffset; /* MiG doesn't use it */
		mach_msg_type_number_t locationCnt;
		char location[128];
	} __Reply__io_registry_entry_get_location_in_plane_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t properties;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t propertiesCnt;
	} __Reply__io_registry_entry_get_property_recursively_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		uint64_t state;
		uint32_t busy_state;
		uint64_t accumulated_busy_time;
	} __Reply__io_service_get_state_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t existing;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		kern_return_t result;
	} __Reply__io_service_get_matching_services_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		kern_return_t result;
		boolean_t matches;
	} __Reply__io_service_match_property_table_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		mach_msg_type_number_t class_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t class_nameCnt;
		char class_name[128];
	} __Reply__io_object_get_superclass_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		mach_msg_type_number_t class_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t class_nameCnt;
		char class_name[128];
	} __Reply__io_object_get_bundle_identifier_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t connection;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		kern_return_t result;
	} __Reply__io_service_open_extended_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		mach_vm_address_t address;
		mach_vm_size_t size;
	} __Reply__io_connect_map_memory_into_task_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_connect_unmap_memory_from_task_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		mach_msg_type_number_t inband_outputCnt;
		char inband_output[4096];
		mach_msg_type_number_t scalar_outputCnt;
		io_user_scalar_t scalar_output[16];
		mach_vm_size_t ool_output_size;
	} __Reply__io_connect_method_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		mach_msg_type_number_t inband_outputCnt;
		char inband_output[4096];
		mach_msg_type_number_t scalar_outputCnt;
		io_user_scalar_t scalar_output[16];
		mach_vm_size_t ool_output_size;
	} __Reply__io_connect_async_method_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_connect_set_notification_port_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t notification;
		/* end of the kernel processed data */
	} __Reply__io_service_add_notification_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t notification;
		/* end of the kernel processed data */
	} __Reply__io_service_add_interest_notification_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t notification;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		kern_return_t result;
	} __Reply__io_service_add_notification_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		uint64_t entry_id;
	} __Reply__io_registry_entry_get_registry_entry_id_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t var_output;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t inband_outputCnt;
		char inband_output[4096];
		mach_msg_type_number_t scalar_outputCnt;
		io_user_scalar_t scalar_output[16];
		mach_msg_type_number_t var_outputCnt;
	} __Reply__io_connect_method_var_output_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t service;
		/* end of the kernel processed data */
	} __Reply__io_service_get_matching_service_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t service;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		kern_return_t result;
	} __Reply__io_service_get_matching_service_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		uint64_t authorization_id;
	} __Reply__io_service_get_authorization_id_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
	} __Reply__io_service_set_authorization_id_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		uint64_t version;
	} __Reply__io_server_version_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t properties;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t propertiesCnt;
	} __Reply__io_registry_entry_get_properties_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t properties;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t propertiesCnt;
	} __Reply__io_registry_entry_get_property_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t service;
		/* end of the kernel processed data */
	} __Reply__io_service_get_matching_service_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t existing;
		/* end of the kernel processed data */
	} __Reply__io_service_get_matching_services_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		kern_return_t RetCode;
		boolean_t matches;
	} __Reply__io_service_match_property_table_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t notification;
		/* end of the kernel processed data */
	} __Reply__io_service_add_notification_bin_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t path_ool;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t pathOffset; /* MiG doesn't use it */
		mach_msg_type_number_t pathCnt;
		char path[4096];
		mach_msg_type_number_t path_oolCnt;
	} __Reply__io_registry_entry_get_path_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t registry_entry;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		kern_return_t result;
	} __Reply__io_registry_entry_from_path_ool_t __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
#endif /* !__Reply__iokit_subsystem__defined */

/* union of all replies */

#ifndef __ReplyUnion__is_iokit_subsystem__defined
#define __ReplyUnion__is_iokit_subsystem__defined
union __ReplyUnion__is_iokit_subsystem {
	__Reply__io_object_get_class_t Reply_io_object_get_class;
	__Reply__io_object_conforms_to_t Reply_io_object_conforms_to;
	__Reply__io_iterator_next_t Reply_io_iterator_next;
	__Reply__io_iterator_reset_t Reply_io_iterator_reset;
	__Reply__io_service_get_matching_services_t Reply_io_service_get_matching_services;
	__Reply__io_registry_entry_get_property_t Reply_io_registry_entry_get_property;
	__Reply__io_registry_create_iterator_t Reply_io_registry_create_iterator;
	__Reply__io_registry_iterator_enter_entry_t Reply_io_registry_iterator_enter_entry;
	__Reply__io_registry_iterator_exit_entry_t Reply_io_registry_iterator_exit_entry;
	__Reply__io_registry_entry_from_path_t Reply_io_registry_entry_from_path;
	__Reply__io_registry_entry_get_name_t Reply_io_registry_entry_get_name;
	__Reply__io_registry_entry_get_properties_t Reply_io_registry_entry_get_properties;
	__Reply__io_registry_entry_get_property_bytes_t Reply_io_registry_entry_get_property_bytes;
	__Reply__io_registry_entry_get_child_iterator_t Reply_io_registry_entry_get_child_iterator;
	__Reply__io_registry_entry_get_parent_iterator_t Reply_io_registry_entry_get_parent_iterator;
	__Reply__io_service_close_t Reply_io_service_close;
	__Reply__io_connect_get_service_t Reply_io_connect_get_service;
	__Reply__io_connect_add_client_t Reply_io_connect_add_client;
	__Reply__io_connect_set_properties_t Reply_io_connect_set_properties;
	__Reply__io_registry_entry_get_path_t Reply_io_registry_entry_get_path;
	__Reply__io_registry_get_root_entry_t Reply_io_registry_get_root_entry;
	__Reply__io_registry_entry_set_properties_t Reply_io_registry_entry_set_properties;
	__Reply__io_registry_entry_in_plane_t Reply_io_registry_entry_in_plane;
	__Reply__io_object_get_retain_count_t Reply_io_object_get_retain_count;
	__Reply__io_service_get_busy_state_t Reply_io_service_get_busy_state;
	__Reply__io_service_wait_quiet_t Reply_io_service_wait_quiet;
	__Reply__io_registry_entry_create_iterator_t Reply_io_registry_entry_create_iterator;
	__Reply__io_iterator_is_valid_t Reply_io_iterator_is_valid;
	__Reply__io_catalog_send_data_t Reply_io_catalog_send_data;
	__Reply__io_catalog_terminate_t Reply_io_catalog_terminate;
	__Reply__io_catalog_get_data_t Reply_io_catalog_get_data;
	__Reply__io_catalog_get_gen_count_t Reply_io_catalog_get_gen_count;
	__Reply__io_catalog_module_loaded_t Reply_io_catalog_module_loaded;
	__Reply__io_catalog_reset_t Reply_io_catalog_reset;
	__Reply__io_service_request_probe_t Reply_io_service_request_probe;
	__Reply__io_registry_entry_get_name_in_plane_t Reply_io_registry_entry_get_name_in_plane;
	__Reply__io_service_match_property_table_t Reply_io_service_match_property_table;
	__Reply__io_connect_get_notification_semaphore_t Reply_io_connect_get_notification_semaphore;
	__Reply__io_registry_entry_get_location_in_plane_t Reply_io_registry_entry_get_location_in_plane;
	__Reply__io_registry_entry_get_property_recursively_t Reply_io_registry_entry_get_property_recursively;
	__Reply__io_service_get_state_t Reply_io_service_get_state;
	__Reply__io_service_get_matching_services_ool_t Reply_io_service_get_matching_services_ool;
	__Reply__io_service_match_property_table_ool_t Reply_io_service_match_property_table_ool;
	__Reply__io_object_get_superclass_t Reply_io_object_get_superclass;
	__Reply__io_object_get_bundle_identifier_t Reply_io_object_get_bundle_identifier;
	__Reply__io_service_open_extended_t Reply_io_service_open_extended;
	__Reply__io_connect_map_memory_into_task_t Reply_io_connect_map_memory_into_task;
	__Reply__io_connect_unmap_memory_from_task_t Reply_io_connect_unmap_memory_from_task;
	__Reply__io_connect_method_t Reply_io_connect_method;
	__Reply__io_connect_async_method_t Reply_io_connect_async_method;
	__Reply__io_connect_set_notification_port_t Reply_io_connect_set_notification_port;
	__Reply__io_service_add_notification_t Reply_io_service_add_notification;
	__Reply__io_service_add_interest_notification_t Reply_io_service_add_interest_notification;
	__Reply__io_service_add_notification_ool_t Reply_io_service_add_notification_ool;
	__Reply__io_registry_entry_get_registry_entry_id_t Reply_io_registry_entry_get_registry_entry_id;
	__Reply__io_connect_method_var_output_t Reply_io_connect_method_var_output;
	__Reply__io_service_get_matching_service_t Reply_io_service_get_matching_service;
	__Reply__io_service_get_matching_service_ool_t Reply_io_service_get_matching_service_ool;
	__Reply__io_service_get_authorization_id_t Reply_io_service_get_authorization_id;
	__Reply__io_service_set_authorization_id_t Reply_io_service_set_authorization_id;
	__Reply__io_server_version_t Reply_io_server_version;
	__Reply__io_registry_entry_get_properties_bin_t Reply_io_registry_entry_get_properties_bin;
	__Reply__io_registry_entry_get_property_bin_t Reply_io_registry_entry_get_property_bin;
	__Reply__io_service_get_matching_service_bin_t Reply_io_service_get_matching_service_bin;
	__Reply__io_service_get_matching_services_bin_t Reply_io_service_get_matching_services_bin;
	__Reply__io_service_match_property_table_bin_t Reply_io_service_match_property_table_bin;
	__Reply__io_service_add_notification_bin_t Reply_io_service_add_notification_bin;
	__Reply__io_registry_entry_get_path_ool_t Reply_io_registry_entry_get_path_ool;
	__Reply__io_registry_entry_from_path_ool_t Reply_io_registry_entry_from_path_ool;
};
#endif /* __RequestUnion__is_iokit_subsystem__defined */
/* Forward Declarations */

mig_internal novalue _Xio_object_get_class
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_object_conforms_to
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_iterator_next
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_iterator_reset
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_get_matching_services
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_property
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_create_iterator
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_iterator_enter_entry
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_iterator_exit_entry
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_from_path
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_name
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_properties
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_property_bytes
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_child_iterator
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_parent_iterator
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_close
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_connect_get_service
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_connect_add_client
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_connect_set_properties
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_path
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_get_root_entry
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_set_properties
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_in_plane
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_object_get_retain_count
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_get_busy_state
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_wait_quiet
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_create_iterator
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_iterator_is_valid
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_catalog_send_data
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_catalog_terminate
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_catalog_get_data
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_catalog_get_gen_count
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_catalog_module_loaded
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_catalog_reset
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_request_probe
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_name_in_plane
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_match_property_table
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_connect_get_notification_semaphore
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_location_in_plane
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_property_recursively
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_get_state
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_get_matching_services_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_match_property_table_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_object_get_superclass
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_object_get_bundle_identifier
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_open_extended
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_connect_map_memory_into_task
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_connect_unmap_memory_from_task
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_connect_method
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_connect_async_method
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_connect_set_notification_port
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_add_notification
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_add_interest_notification
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_add_notification_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_registry_entry_id
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_connect_method_var_output
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_get_matching_service
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_get_matching_service_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_get_authorization_id
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_set_authorization_id
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_server_version
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_properties_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_property_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_get_matching_service_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_get_matching_services_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_match_property_table_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_service_add_notification_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_get_path_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

mig_internal novalue _Xio_registry_entry_from_path_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP);

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_object_get_class_t__defined)
#define __MIG_check__Request__io_object_get_class_t__defined

mig_internal kern_return_t __MIG_check__Request__io_object_get_class_t(__attribute__((__unused__)) __Request__io_object_get_class_t *In0P)
{

	typedef __Request__io_object_get_class_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_object_get_class_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_object_get_class */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_object_get_class
(
	mach_port_t object,
	io_name_t className
);

/* Routine io_object_get_class */
mig_internal novalue _Xio_object_get_class
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_object_get_class_t __Request;
	typedef __Reply__io_object_get_class_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_object_get_class_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_object_get_class_t__defined */

	__DeclareRcvRpc(2800, "io_object_get_class")
	__BeforeRcvRpc(2800, "io_object_get_class")

#if	defined(__MIG_check__Request__io_object_get_class_t__defined)
	check_result = __MIG_check__Request__io_object_get_class_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_object_get_class_t__defined) */

	OutP->RetCode = is_io_object_get_class(In0P->Head.msgh_request_port, OutP->className);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

#ifdef __LP64__
	{
		size_t strLength = strlen(OutP->className) + 1;
		if (strLength > 0xffffffff)
			MIG_RETURN_ERROR(OutP, MIG_BAD_ARGUMENTS);
		OutP->classNameCnt = (mach_msg_type_number_t) strLength;
	}
#else
	OutP->classNameCnt = (mach_msg_type_number_t) strlen(OutP->className) + 1;
#endif /* __LP64__ */
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutP->classNameCnt + 3) & ~3));

	__AfterRcvRpc(2800, "io_object_get_class")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_object_conforms_to_t__defined)
#define __MIG_check__Request__io_object_conforms_to_t__defined

mig_internal kern_return_t __MIG_check__Request__io_object_conforms_to_t(__attribute__((__unused__)) __Request__io_object_conforms_to_t *In0P)
{

	typedef __Request__io_object_conforms_to_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_object_conforms_to_t__classNameCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_object_conforms_to_t__classNameCnt(&In0P->classNameCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_object_conforms_to_t__classNameCnt__defined */
#if	__MigTypeCheck
	if ( In0P->classNameCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->classNameCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->classNameCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->className),  128);
		if (( memchr(In0P->className, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_object_conforms_to_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_object_conforms_to */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_object_conforms_to
(
	mach_port_t object,
	io_name_t className,
	boolean_t *conforms
);

/* Routine io_object_conforms_to */
mig_internal novalue _Xio_object_conforms_to
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t classNameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t classNameCnt;
		char className[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_object_conforms_to_t __Request;
	typedef __Reply__io_object_conforms_to_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_object_conforms_to_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_object_conforms_to_t__defined */

	__DeclareRcvRpc(2801, "io_object_conforms_to")
	__BeforeRcvRpc(2801, "io_object_conforms_to")

#if	defined(__MIG_check__Request__io_object_conforms_to_t__defined)
	check_result = __MIG_check__Request__io_object_conforms_to_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_object_conforms_to_t__defined) */

	OutP->RetCode = is_io_object_conforms_to(In0P->Head.msgh_request_port, In0P->className, &OutP->conforms);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2801, "io_object_conforms_to")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_iterator_next_t__defined)
#define __MIG_check__Request__io_iterator_next_t__defined

mig_internal kern_return_t __MIG_check__Request__io_iterator_next_t(__attribute__((__unused__)) __Request__io_iterator_next_t *In0P)
{

	typedef __Request__io_iterator_next_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_iterator_next_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_iterator_next */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_iterator_next
(
	mach_port_t iterator,
	mach_port_t *object
);

/* Routine io_iterator_next */
mig_internal novalue _Xio_iterator_next
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_iterator_next_t __Request;
	typedef __Reply__io_iterator_next_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_iterator_next_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_iterator_next_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t objectTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2802, "io_iterator_next")
	__BeforeRcvRpc(2802, "io_iterator_next")

#if	defined(__MIG_check__Request__io_iterator_next_t__defined)
	check_result = __MIG_check__Request__io_iterator_next_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_iterator_next_t__defined) */

#if	UseStaticTemplates
	OutP->object = objectTemplate;
#else	/* UseStaticTemplates */
	OutP->object.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->object.pad1 = 0;
#endif
	OutP->object.pad2 = 0;
	OutP->object.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->object.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_iterator_next(In0P->Head.msgh_request_port, &OutP->object.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2802, "io_iterator_next")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_iterator_reset_t__defined)
#define __MIG_check__Request__io_iterator_reset_t__defined

mig_internal kern_return_t __MIG_check__Request__io_iterator_reset_t(__attribute__((__unused__)) __Request__io_iterator_reset_t *In0P)
{

	typedef __Request__io_iterator_reset_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_iterator_reset_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_iterator_reset */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_iterator_reset
(
	mach_port_t iterator
);

/* Routine io_iterator_reset */
mig_internal novalue _Xio_iterator_reset
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_iterator_reset_t __Request;
	typedef __Reply__io_iterator_reset_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_iterator_reset_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_iterator_reset_t__defined */

	__DeclareRcvRpc(2803, "io_iterator_reset")
	__BeforeRcvRpc(2803, "io_iterator_reset")

#if	defined(__MIG_check__Request__io_iterator_reset_t__defined)
	check_result = __MIG_check__Request__io_iterator_reset_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_iterator_reset_t__defined) */

	OutP->RetCode = is_io_iterator_reset(In0P->Head.msgh_request_port);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2803, "io_iterator_reset")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_get_matching_services_t__defined)
#define __MIG_check__Request__io_service_get_matching_services_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_services_t(__attribute__((__unused__)) __Request__io_service_get_matching_services_t *In0P)
{

	typedef __Request__io_service_get_matching_services_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 512)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_service_get_matching_services_t__matchingCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_get_matching_services_t__matchingCnt(&In0P->matchingCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_get_matching_services_t__matchingCnt__defined */
#if	__MigTypeCheck
	if ( In0P->matchingCnt > 512 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 512)) < In0P->matchingCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 512) + _WALIGN_(In0P->matchingCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->matching),  512);
		if (( memchr(In0P->matching, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_get_matching_services_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_get_matching_services */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_get_matching_services
(
	mach_port_t master_port,
	io_string_t matching,
	mach_port_t *existing
);

/* Routine io_service_get_matching_services */
mig_internal novalue _Xio_service_get_matching_services
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
		mach_msg_type_number_t matchingCnt;
		char matching[512];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_get_matching_services_t __Request;
	typedef __Reply__io_service_get_matching_services_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_get_matching_services_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_get_matching_services_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t existingTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2804, "io_service_get_matching_services")
	__BeforeRcvRpc(2804, "io_service_get_matching_services")

#if	defined(__MIG_check__Request__io_service_get_matching_services_t__defined)
	check_result = __MIG_check__Request__io_service_get_matching_services_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_get_matching_services_t__defined) */

#if	UseStaticTemplates
	OutP->existing = existingTemplate;
#else	/* UseStaticTemplates */
	OutP->existing.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->existing.pad1 = 0;
#endif
	OutP->existing.pad2 = 0;
	OutP->existing.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->existing.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_service_get_matching_services(In0P->Head.msgh_request_port, In0P->matching, &OutP->existing.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2804, "io_service_get_matching_services")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_property_t__defined)
#define __MIG_check__Request__io_registry_entry_get_property_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_property_t(__attribute__((__unused__)) __Request__io_registry_entry_get_property_t *In0P)
{

	typedef __Request__io_registry_entry_get_property_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_t__property_nameCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_property_t__property_nameCnt(&In0P->property_nameCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_property_t__property_nameCnt__defined */
#if	__MigTypeCheck
	if ( In0P->property_nameCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->property_nameCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->property_nameCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->property_name),  128);
		if (( memchr(In0P->property_name, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_property_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_property */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_property
(
	mach_port_t registry_entry,
	io_name_t property_name,
	io_buf_ptr_t *properties,
	mach_msg_type_number_t *propertiesCnt
);

/* Routine io_registry_entry_get_property */
mig_internal novalue _Xio_registry_entry_get_property
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t property_nameCnt;
		char property_name[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_property_t __Request;
	typedef __Reply__io_registry_entry_get_property_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_property_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_property_t__defined */

#if	UseStaticTemplates
	const static mach_msg_ool_descriptor_t propertiesTemplate = {
		/* addr = */		(void *)0,
		/* size = */		0,
		/* deal = */		FALSE,
		/* copy = */		MACH_MSG_PHYSICAL_COPY,
		/* pad2 = */		0,
		/* type = */		MACH_MSG_OOL_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2805, "io_registry_entry_get_property")
	__BeforeRcvRpc(2805, "io_registry_entry_get_property")

#if	defined(__MIG_check__Request__io_registry_entry_get_property_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_property_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_property_t__defined) */

#if	UseStaticTemplates
	OutP->properties = propertiesTemplate;
#else	/* UseStaticTemplates */
	OutP->properties.deallocate =  FALSE;
	OutP->properties.copy = MACH_MSG_PHYSICAL_COPY;
	OutP->properties.pad1 = 0;
	OutP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
#if defined(KERNEL) && !defined(__LP64__)
	OutP->properties.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_entry_get_property(In0P->Head.msgh_request_port, In0P->property_name, (io_buf_ptr_t *)&(OutP->properties.address), &OutP->propertiesCnt);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}
	OutP->properties.size = OutP->propertiesCnt;

	OutP->NDR = NDR_record;

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2805, "io_registry_entry_get_property")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_create_iterator_t__defined)
#define __MIG_check__Request__io_registry_create_iterator_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_create_iterator_t(__attribute__((__unused__)) __Request__io_registry_create_iterator_t *In0P, __attribute__((__unused__)) __Request__io_registry_create_iterator_t **In1PP)
{

	typedef __Request__io_registry_create_iterator_t __Request;
	__Request *In1P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_create_iterator_t__planeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_create_iterator_t__planeCnt(&In0P->planeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_create_iterator_t__planeCnt__defined */
	msgh_size_delta = _WALIGN_(In0P->planeCnt);
#if	__MigTypeCheck
	if ( In0P->planeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->planeCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->planeCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 128);

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->plane),  128);
		if (( memchr(In0P->plane, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_create_iterator_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_create_iterator */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_create_iterator
(
	mach_port_t master_port,
	io_name_t plane,
	uint32_t options,
	mach_port_t *iterator
);

/* Routine io_registry_create_iterator */
mig_internal novalue _Xio_registry_create_iterator
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		uint32_t options;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_create_iterator_t __Request;
	typedef __Reply__io_registry_create_iterator_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_create_iterator_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_create_iterator_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t iteratorTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2806, "io_registry_create_iterator")
	__BeforeRcvRpc(2806, "io_registry_create_iterator")

#if	defined(__MIG_check__Request__io_registry_create_iterator_t__defined)
	check_result = __MIG_check__Request__io_registry_create_iterator_t((__Request *)In0P, (__Request **)&In1P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_create_iterator_t__defined) */

#if	UseStaticTemplates
	OutP->iterator = iteratorTemplate;
#else	/* UseStaticTemplates */
	OutP->iterator.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->iterator.pad1 = 0;
#endif
	OutP->iterator.pad2 = 0;
	OutP->iterator.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->iterator.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_create_iterator(In0P->Head.msgh_request_port, In0P->plane, In1P->options, &OutP->iterator.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2806, "io_registry_create_iterator")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_iterator_enter_entry_t__defined)
#define __MIG_check__Request__io_registry_iterator_enter_entry_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_iterator_enter_entry_t(__attribute__((__unused__)) __Request__io_registry_iterator_enter_entry_t *In0P)
{

	typedef __Request__io_registry_iterator_enter_entry_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_iterator_enter_entry_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_iterator_enter_entry */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_iterator_enter_entry
(
	mach_port_t iterator
);

/* Routine io_registry_iterator_enter_entry */
mig_internal novalue _Xio_registry_iterator_enter_entry
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_iterator_enter_entry_t __Request;
	typedef __Reply__io_registry_iterator_enter_entry_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_iterator_enter_entry_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_iterator_enter_entry_t__defined */

	__DeclareRcvRpc(2807, "io_registry_iterator_enter_entry")
	__BeforeRcvRpc(2807, "io_registry_iterator_enter_entry")

#if	defined(__MIG_check__Request__io_registry_iterator_enter_entry_t__defined)
	check_result = __MIG_check__Request__io_registry_iterator_enter_entry_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_iterator_enter_entry_t__defined) */

	OutP->RetCode = is_io_registry_iterator_enter_entry(In0P->Head.msgh_request_port);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2807, "io_registry_iterator_enter_entry")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_iterator_exit_entry_t__defined)
#define __MIG_check__Request__io_registry_iterator_exit_entry_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_iterator_exit_entry_t(__attribute__((__unused__)) __Request__io_registry_iterator_exit_entry_t *In0P)
{

	typedef __Request__io_registry_iterator_exit_entry_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_iterator_exit_entry_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_iterator_exit_entry */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_iterator_exit_entry
(
	mach_port_t iterator
);

/* Routine io_registry_iterator_exit_entry */
mig_internal novalue _Xio_registry_iterator_exit_entry
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_iterator_exit_entry_t __Request;
	typedef __Reply__io_registry_iterator_exit_entry_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_iterator_exit_entry_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_iterator_exit_entry_t__defined */

	__DeclareRcvRpc(2808, "io_registry_iterator_exit_entry")
	__BeforeRcvRpc(2808, "io_registry_iterator_exit_entry")

#if	defined(__MIG_check__Request__io_registry_iterator_exit_entry_t__defined)
	check_result = __MIG_check__Request__io_registry_iterator_exit_entry_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_iterator_exit_entry_t__defined) */

	OutP->RetCode = is_io_registry_iterator_exit_entry(In0P->Head.msgh_request_port);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2808, "io_registry_iterator_exit_entry")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_from_path_t__defined)
#define __MIG_check__Request__io_registry_entry_from_path_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_from_path_t(__attribute__((__unused__)) __Request__io_registry_entry_from_path_t *In0P)
{

	typedef __Request__io_registry_entry_from_path_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 512)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_from_path_t__pathCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_from_path_t__pathCnt(&In0P->pathCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_from_path_t__pathCnt__defined */
#if	__MigTypeCheck
	if ( In0P->pathCnt > 512 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 512)) < In0P->pathCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 512) + _WALIGN_(In0P->pathCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->path),  512);
		if (( memchr(In0P->path, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_from_path_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_from_path */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_from_path
(
	mach_port_t master_port,
	io_string_t path,
	mach_port_t *registry_entry
);

/* Routine io_registry_entry_from_path */
mig_internal novalue _Xio_registry_entry_from_path
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t pathOffset; /* MiG doesn't use it */
		mach_msg_type_number_t pathCnt;
		char path[512];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_from_path_t __Request;
	typedef __Reply__io_registry_entry_from_path_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_from_path_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_from_path_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t registry_entryTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2809, "io_registry_entry_from_path")
	__BeforeRcvRpc(2809, "io_registry_entry_from_path")

#if	defined(__MIG_check__Request__io_registry_entry_from_path_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_from_path_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_from_path_t__defined) */

#if	UseStaticTemplates
	OutP->registry_entry = registry_entryTemplate;
#else	/* UseStaticTemplates */
	OutP->registry_entry.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->registry_entry.pad1 = 0;
#endif
	OutP->registry_entry.pad2 = 0;
	OutP->registry_entry.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->registry_entry.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_entry_from_path(In0P->Head.msgh_request_port, In0P->path, &OutP->registry_entry.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2809, "io_registry_entry_from_path")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_name_t__defined)
#define __MIG_check__Request__io_registry_entry_get_name_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_name_t(__attribute__((__unused__)) __Request__io_registry_entry_get_name_t *In0P)
{

	typedef __Request__io_registry_entry_get_name_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_name_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_name */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_name
(
	mach_port_t registry_entry,
	io_name_t name
);

/* Routine io_registry_entry_get_name */
mig_internal novalue _Xio_registry_entry_get_name
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_name_t __Request;
	typedef __Reply__io_registry_entry_get_name_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_name_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_name_t__defined */

	__DeclareRcvRpc(2810, "io_registry_entry_get_name")
	__BeforeRcvRpc(2810, "io_registry_entry_get_name")

#if	defined(__MIG_check__Request__io_registry_entry_get_name_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_name_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_name_t__defined) */

	OutP->RetCode = is_io_registry_entry_get_name(In0P->Head.msgh_request_port, OutP->name);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

#ifdef __LP64__
	{
		size_t strLength = strlen(OutP->name) + 1;
		if (strLength > 0xffffffff)
			MIG_RETURN_ERROR(OutP, MIG_BAD_ARGUMENTS);
		OutP->nameCnt = (mach_msg_type_number_t) strLength;
	}
#else
	OutP->nameCnt = (mach_msg_type_number_t) strlen(OutP->name) + 1;
#endif /* __LP64__ */
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutP->nameCnt + 3) & ~3));

	__AfterRcvRpc(2810, "io_registry_entry_get_name")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_properties_t__defined)
#define __MIG_check__Request__io_registry_entry_get_properties_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_properties_t(__attribute__((__unused__)) __Request__io_registry_entry_get_properties_t *In0P)
{

	typedef __Request__io_registry_entry_get_properties_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_properties_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_properties */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_properties
(
	mach_port_t registry_entry,
	io_buf_ptr_t *properties,
	mach_msg_type_number_t *propertiesCnt
);

/* Routine io_registry_entry_get_properties */
mig_internal novalue _Xio_registry_entry_get_properties
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_properties_t __Request;
	typedef __Reply__io_registry_entry_get_properties_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_properties_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_properties_t__defined */

#if	UseStaticTemplates
	const static mach_msg_ool_descriptor_t propertiesTemplate = {
		/* addr = */		(void *)0,
		/* size = */		0,
		/* deal = */		FALSE,
		/* copy = */		MACH_MSG_PHYSICAL_COPY,
		/* pad2 = */		0,
		/* type = */		MACH_MSG_OOL_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2811, "io_registry_entry_get_properties")
	__BeforeRcvRpc(2811, "io_registry_entry_get_properties")

#if	defined(__MIG_check__Request__io_registry_entry_get_properties_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_properties_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_properties_t__defined) */

#if	UseStaticTemplates
	OutP->properties = propertiesTemplate;
#else	/* UseStaticTemplates */
	OutP->properties.deallocate =  FALSE;
	OutP->properties.copy = MACH_MSG_PHYSICAL_COPY;
	OutP->properties.pad1 = 0;
	OutP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
#if defined(KERNEL) && !defined(__LP64__)
	OutP->properties.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_entry_get_properties(In0P->Head.msgh_request_port, (io_buf_ptr_t *)&(OutP->properties.address), &OutP->propertiesCnt);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}
	OutP->properties.size = OutP->propertiesCnt;

	OutP->NDR = NDR_record;

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2811, "io_registry_entry_get_properties")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_property_bytes_t__defined)
#define __MIG_check__Request__io_registry_entry_get_property_bytes_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_property_bytes_t(__attribute__((__unused__)) __Request__io_registry_entry_get_property_bytes_t *In0P, __attribute__((__unused__)) __Request__io_registry_entry_get_property_bytes_t **In1PP)
{

	typedef __Request__io_registry_entry_get_property_bytes_t __Request;
	__Request *In1P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_bytes_t__property_nameCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_property_bytes_t__property_nameCnt(&In0P->property_nameCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_property_bytes_t__property_nameCnt__defined */
	msgh_size_delta = _WALIGN_(In0P->property_nameCnt);
#if	__MigTypeCheck
	if ( In0P->property_nameCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->property_nameCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->property_nameCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 128);

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->property_name),  128);
		if (( memchr(In0P->property_name, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_property_bytes_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_property_bytes */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_property_bytes
(
	mach_port_t registry_entry,
	io_name_t property_name,
	io_struct_inband_t data,
	mach_msg_type_number_t *dataCnt
);

/* Routine io_registry_entry_get_property_bytes */
mig_internal novalue _Xio_registry_entry_get_property_bytes
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t property_nameCnt;
		char property_name[128];
		mach_msg_type_number_t dataCnt;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_property_bytes_t __Request;
	typedef __Reply__io_registry_entry_get_property_bytes_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_property_bytes_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_property_bytes_t__defined */

	__DeclareRcvRpc(2812, "io_registry_entry_get_property_bytes")
	__BeforeRcvRpc(2812, "io_registry_entry_get_property_bytes")

#if	defined(__MIG_check__Request__io_registry_entry_get_property_bytes_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_property_bytes_t((__Request *)In0P, (__Request **)&In1P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_property_bytes_t__defined) */

	OutP->dataCnt = 4096;
	if (In1P->dataCnt < OutP->dataCnt)
		OutP->dataCnt = In1P->dataCnt;

	OutP->RetCode = is_io_registry_entry_get_property_bytes(In0P->Head.msgh_request_port, In0P->property_name, OutP->data, &OutP->dataCnt);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4096) + (_WALIGN_((OutP->dataCnt + 3) & ~3));

	__AfterRcvRpc(2812, "io_registry_entry_get_property_bytes")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_child_iterator_t__defined)
#define __MIG_check__Request__io_registry_entry_get_child_iterator_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_child_iterator_t(__attribute__((__unused__)) __Request__io_registry_entry_get_child_iterator_t *In0P)
{

	typedef __Request__io_registry_entry_get_child_iterator_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_child_iterator_t__planeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_child_iterator_t__planeCnt(&In0P->planeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_child_iterator_t__planeCnt__defined */
#if	__MigTypeCheck
	if ( In0P->planeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->planeCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->planeCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->plane),  128);
		if (( memchr(In0P->plane, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_child_iterator_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_child_iterator */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_child_iterator
(
	mach_port_t registry_entry,
	io_name_t plane,
	mach_port_t *iterator
);

/* Routine io_registry_entry_get_child_iterator */
mig_internal novalue _Xio_registry_entry_get_child_iterator
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_child_iterator_t __Request;
	typedef __Reply__io_registry_entry_get_child_iterator_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_child_iterator_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_child_iterator_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t iteratorTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2813, "io_registry_entry_get_child_iterator")
	__BeforeRcvRpc(2813, "io_registry_entry_get_child_iterator")

#if	defined(__MIG_check__Request__io_registry_entry_get_child_iterator_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_child_iterator_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_child_iterator_t__defined) */

#if	UseStaticTemplates
	OutP->iterator = iteratorTemplate;
#else	/* UseStaticTemplates */
	OutP->iterator.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->iterator.pad1 = 0;
#endif
	OutP->iterator.pad2 = 0;
	OutP->iterator.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->iterator.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_entry_get_child_iterator(In0P->Head.msgh_request_port, In0P->plane, &OutP->iterator.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2813, "io_registry_entry_get_child_iterator")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined)
#define __MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_parent_iterator_t(__attribute__((__unused__)) __Request__io_registry_entry_get_parent_iterator_t *In0P)
{

	typedef __Request__io_registry_entry_get_parent_iterator_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_parent_iterator_t__planeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_parent_iterator_t__planeCnt(&In0P->planeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_parent_iterator_t__planeCnt__defined */
#if	__MigTypeCheck
	if ( In0P->planeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->planeCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->planeCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->plane),  128);
		if (( memchr(In0P->plane, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_parent_iterator */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_parent_iterator
(
	mach_port_t registry_entry,
	io_name_t plane,
	mach_port_t *iterator
);

/* Routine io_registry_entry_get_parent_iterator */
mig_internal novalue _Xio_registry_entry_get_parent_iterator
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_parent_iterator_t __Request;
	typedef __Reply__io_registry_entry_get_parent_iterator_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t iteratorTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2814, "io_registry_entry_get_parent_iterator")
	__BeforeRcvRpc(2814, "io_registry_entry_get_parent_iterator")

#if	defined(__MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_parent_iterator_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_parent_iterator_t__defined) */

#if	UseStaticTemplates
	OutP->iterator = iteratorTemplate;
#else	/* UseStaticTemplates */
	OutP->iterator.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->iterator.pad1 = 0;
#endif
	OutP->iterator.pad2 = 0;
	OutP->iterator.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->iterator.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_entry_get_parent_iterator(In0P->Head.msgh_request_port, In0P->plane, &OutP->iterator.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2814, "io_registry_entry_get_parent_iterator")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_close_t__defined)
#define __MIG_check__Request__io_service_close_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_close_t(__attribute__((__unused__)) __Request__io_service_close_t *In0P)
{

	typedef __Request__io_service_close_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_close_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_close */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_close
(
	mach_port_t connection
);

/* Routine io_service_close */
mig_internal novalue _Xio_service_close
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_close_t __Request;
	typedef __Reply__io_service_close_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_close_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_close_t__defined */

	__DeclareRcvRpc(2816, "io_service_close")
	__BeforeRcvRpc(2816, "io_service_close")

#if	defined(__MIG_check__Request__io_service_close_t__defined)
	check_result = __MIG_check__Request__io_service_close_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_close_t__defined) */

	OutP->RetCode = is_io_service_close(In0P->Head.msgh_request_port);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2816, "io_service_close")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_connect_get_service_t__defined)
#define __MIG_check__Request__io_connect_get_service_t__defined

mig_internal kern_return_t __MIG_check__Request__io_connect_get_service_t(__attribute__((__unused__)) __Request__io_connect_get_service_t *In0P)
{

	typedef __Request__io_connect_get_service_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_connect_get_service_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_connect_get_service */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_connect_get_service
(
	mach_port_t connection,
	mach_port_t *service
);

/* Routine io_connect_get_service */
mig_internal novalue _Xio_connect_get_service
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_connect_get_service_t __Request;
	typedef __Reply__io_connect_get_service_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_connect_get_service_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_connect_get_service_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t serviceTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2817, "io_connect_get_service")
	__BeforeRcvRpc(2817, "io_connect_get_service")

#if	defined(__MIG_check__Request__io_connect_get_service_t__defined)
	check_result = __MIG_check__Request__io_connect_get_service_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_connect_get_service_t__defined) */

#if	UseStaticTemplates
	OutP->service = serviceTemplate;
#else	/* UseStaticTemplates */
	OutP->service.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->service.pad1 = 0;
#endif
	OutP->service.pad2 = 0;
	OutP->service.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->service.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_connect_get_service(In0P->Head.msgh_request_port, &OutP->service.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2817, "io_connect_get_service")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_connect_add_client_t__defined)
#define __MIG_check__Request__io_connect_add_client_t__defined

mig_internal kern_return_t __MIG_check__Request__io_connect_add_client_t(__attribute__((__unused__)) __Request__io_connect_add_client_t *In0P)
{

	typedef __Request__io_connect_add_client_t __Request;
#if	__MigTypeCheck
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->connect_to.type != MACH_MSG_PORT_DESCRIPTOR ||
	    In0P->connect_to.disposition != 17)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_connect_add_client_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_connect_add_client */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_connect_add_client
(
	mach_port_t connection,
	mach_port_t connect_to
);

/* Routine io_connect_add_client */
mig_internal novalue _Xio_connect_add_client
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t connect_to;
		/* end of the kernel processed data */
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_connect_add_client_t __Request;
	typedef __Reply__io_connect_add_client_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_connect_add_client_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_connect_add_client_t__defined */

	__DeclareRcvRpc(2820, "io_connect_add_client")
	__BeforeRcvRpc(2820, "io_connect_add_client")

#if	defined(__MIG_check__Request__io_connect_add_client_t__defined)
	check_result = __MIG_check__Request__io_connect_add_client_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_connect_add_client_t__defined) */

	OutP->RetCode = is_io_connect_add_client(In0P->Head.msgh_request_port, In0P->connect_to.name);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2820, "io_connect_add_client")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_connect_set_properties_t__defined)
#define __MIG_check__Request__io_connect_set_properties_t__defined

mig_internal kern_return_t __MIG_check__Request__io_connect_set_properties_t(__attribute__((__unused__)) __Request__io_connect_set_properties_t *In0P)
{

	typedef __Request__io_connect_set_properties_t __Request;
#if	__MigTypeCheck
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->properties.type != MACH_MSG_OOL_DESCRIPTOR)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	if (In0P->properties.size != In0P->propertiesCnt)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_connect_set_properties_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_connect_set_properties */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_connect_set_properties
(
	mach_port_t connection,
	io_buf_ptr_t properties,
	mach_msg_type_number_t propertiesCnt,
	kern_return_t *result
);

/* Routine io_connect_set_properties */
mig_internal novalue _Xio_connect_set_properties
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t properties;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t propertiesCnt;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_connect_set_properties_t __Request;
	typedef __Reply__io_connect_set_properties_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_connect_set_properties_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_connect_set_properties_t__defined */

	__DeclareRcvRpc(2821, "io_connect_set_properties")
	__BeforeRcvRpc(2821, "io_connect_set_properties")

#if	defined(__MIG_check__Request__io_connect_set_properties_t__defined)
	check_result = __MIG_check__Request__io_connect_set_properties_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_connect_set_properties_t__defined) */

	OutP->RetCode = is_io_connect_set_properties(In0P->Head.msgh_request_port, (io_buf_ptr_t)(In0P->properties.address), In0P->properties.size, &OutP->result);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2821, "io_connect_set_properties")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_path_t__defined)
#define __MIG_check__Request__io_registry_entry_get_path_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_path_t(__attribute__((__unused__)) __Request__io_registry_entry_get_path_t *In0P)
{

	typedef __Request__io_registry_entry_get_path_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_path_t__planeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_path_t__planeCnt(&In0P->planeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_path_t__planeCnt__defined */
#if	__MigTypeCheck
	if ( In0P->planeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->planeCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->planeCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->plane),  128);
		if (( memchr(In0P->plane, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_path_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_path */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_path
(
	mach_port_t registry_entry,
	io_name_t plane,
	io_string_t path
);

/* Routine io_registry_entry_get_path */
mig_internal novalue _Xio_registry_entry_get_path
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_path_t __Request;
	typedef __Reply__io_registry_entry_get_path_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_path_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_path_t__defined */

	__DeclareRcvRpc(2826, "io_registry_entry_get_path")
	__BeforeRcvRpc(2826, "io_registry_entry_get_path")

#if	defined(__MIG_check__Request__io_registry_entry_get_path_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_path_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_path_t__defined) */

	OutP->RetCode = is_io_registry_entry_get_path(In0P->Head.msgh_request_port, In0P->plane, OutP->path);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

#ifdef __LP64__
	{
		size_t strLength = strlen(OutP->path) + 1;
		if (strLength > 0xffffffff)
			MIG_RETURN_ERROR(OutP, MIG_BAD_ARGUMENTS);
		OutP->pathCnt = (mach_msg_type_number_t) strLength;
	}
#else
	OutP->pathCnt = (mach_msg_type_number_t) strlen(OutP->path) + 1;
#endif /* __LP64__ */
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 512) + (_WALIGN_((OutP->pathCnt + 3) & ~3));

	__AfterRcvRpc(2826, "io_registry_entry_get_path")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_get_root_entry_t__defined)
#define __MIG_check__Request__io_registry_get_root_entry_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_get_root_entry_t(__attribute__((__unused__)) __Request__io_registry_get_root_entry_t *In0P)
{

	typedef __Request__io_registry_get_root_entry_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_get_root_entry_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_get_root_entry */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_get_root_entry
(
	mach_port_t master_port,
	mach_port_t *root
);

/* Routine io_registry_get_root_entry */
mig_internal novalue _Xio_registry_get_root_entry
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_get_root_entry_t __Request;
	typedef __Reply__io_registry_get_root_entry_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_get_root_entry_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_get_root_entry_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t rootTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2827, "io_registry_get_root_entry")
	__BeforeRcvRpc(2827, "io_registry_get_root_entry")

#if	defined(__MIG_check__Request__io_registry_get_root_entry_t__defined)
	check_result = __MIG_check__Request__io_registry_get_root_entry_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_get_root_entry_t__defined) */

#if	UseStaticTemplates
	OutP->root = rootTemplate;
#else	/* UseStaticTemplates */
	OutP->root.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->root.pad1 = 0;
#endif
	OutP->root.pad2 = 0;
	OutP->root.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->root.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_get_root_entry(In0P->Head.msgh_request_port, &OutP->root.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2827, "io_registry_get_root_entry")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_set_properties_t__defined)
#define __MIG_check__Request__io_registry_entry_set_properties_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_set_properties_t(__attribute__((__unused__)) __Request__io_registry_entry_set_properties_t *In0P)
{

	typedef __Request__io_registry_entry_set_properties_t __Request;
#if	__MigTypeCheck
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->properties.type != MACH_MSG_OOL_DESCRIPTOR)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	if (In0P->properties.size != In0P->propertiesCnt)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_set_properties_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_set_properties */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_set_properties
(
	mach_port_t registry_entry,
	io_buf_ptr_t properties,
	mach_msg_type_number_t propertiesCnt,
	kern_return_t *result
);

/* Routine io_registry_entry_set_properties */
mig_internal novalue _Xio_registry_entry_set_properties
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t properties;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t propertiesCnt;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_set_properties_t __Request;
	typedef __Reply__io_registry_entry_set_properties_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_set_properties_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_set_properties_t__defined */

	__DeclareRcvRpc(2828, "io_registry_entry_set_properties")
	__BeforeRcvRpc(2828, "io_registry_entry_set_properties")

#if	defined(__MIG_check__Request__io_registry_entry_set_properties_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_set_properties_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_set_properties_t__defined) */

	OutP->RetCode = is_io_registry_entry_set_properties(In0P->Head.msgh_request_port, (io_buf_ptr_t)(In0P->properties.address), In0P->properties.size, &OutP->result);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2828, "io_registry_entry_set_properties")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_in_plane_t__defined)
#define __MIG_check__Request__io_registry_entry_in_plane_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_in_plane_t(__attribute__((__unused__)) __Request__io_registry_entry_in_plane_t *In0P)
{

	typedef __Request__io_registry_entry_in_plane_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_in_plane_t__planeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_in_plane_t__planeCnt(&In0P->planeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_in_plane_t__planeCnt__defined */
#if	__MigTypeCheck
	if ( In0P->planeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->planeCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->planeCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->plane),  128);
		if (( memchr(In0P->plane, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_in_plane_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_in_plane */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_in_plane
(
	mach_port_t registry_entry,
	io_name_t plane,
	boolean_t *inPlane
);

/* Routine io_registry_entry_in_plane */
mig_internal novalue _Xio_registry_entry_in_plane
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_in_plane_t __Request;
	typedef __Reply__io_registry_entry_in_plane_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_in_plane_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_in_plane_t__defined */

	__DeclareRcvRpc(2829, "io_registry_entry_in_plane")
	__BeforeRcvRpc(2829, "io_registry_entry_in_plane")

#if	defined(__MIG_check__Request__io_registry_entry_in_plane_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_in_plane_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_in_plane_t__defined) */

	OutP->RetCode = is_io_registry_entry_in_plane(In0P->Head.msgh_request_port, In0P->plane, &OutP->inPlane);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2829, "io_registry_entry_in_plane")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_object_get_retain_count_t__defined)
#define __MIG_check__Request__io_object_get_retain_count_t__defined

mig_internal kern_return_t __MIG_check__Request__io_object_get_retain_count_t(__attribute__((__unused__)) __Request__io_object_get_retain_count_t *In0P)
{

	typedef __Request__io_object_get_retain_count_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_object_get_retain_count_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_object_get_retain_count */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_object_get_retain_count
(
	mach_port_t object,
	uint32_t *retainCount
);

/* Routine io_object_get_retain_count */
mig_internal novalue _Xio_object_get_retain_count
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_object_get_retain_count_t __Request;
	typedef __Reply__io_object_get_retain_count_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_object_get_retain_count_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_object_get_retain_count_t__defined */

	__DeclareRcvRpc(2830, "io_object_get_retain_count")
	__BeforeRcvRpc(2830, "io_object_get_retain_count")

#if	defined(__MIG_check__Request__io_object_get_retain_count_t__defined)
	check_result = __MIG_check__Request__io_object_get_retain_count_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_object_get_retain_count_t__defined) */

	OutP->RetCode = is_io_object_get_retain_count(In0P->Head.msgh_request_port, &OutP->retainCount);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2830, "io_object_get_retain_count")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_get_busy_state_t__defined)
#define __MIG_check__Request__io_service_get_busy_state_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_get_busy_state_t(__attribute__((__unused__)) __Request__io_service_get_busy_state_t *In0P)
{

	typedef __Request__io_service_get_busy_state_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_get_busy_state_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_get_busy_state */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_get_busy_state
(
	mach_port_t service,
	uint32_t *busyState
);

/* Routine io_service_get_busy_state */
mig_internal novalue _Xio_service_get_busy_state
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_get_busy_state_t __Request;
	typedef __Reply__io_service_get_busy_state_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_get_busy_state_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_get_busy_state_t__defined */

	__DeclareRcvRpc(2831, "io_service_get_busy_state")
	__BeforeRcvRpc(2831, "io_service_get_busy_state")

#if	defined(__MIG_check__Request__io_service_get_busy_state_t__defined)
	check_result = __MIG_check__Request__io_service_get_busy_state_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_get_busy_state_t__defined) */

	OutP->RetCode = is_io_service_get_busy_state(In0P->Head.msgh_request_port, &OutP->busyState);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2831, "io_service_get_busy_state")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_wait_quiet_t__defined)
#define __MIG_check__Request__io_service_wait_quiet_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_wait_quiet_t(__attribute__((__unused__)) __Request__io_service_wait_quiet_t *In0P)
{

	typedef __Request__io_service_wait_quiet_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_wait_quiet_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_wait_quiet */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_wait_quiet
(
	mach_port_t service,
	mach_timespec_t wait_time
);

/* Routine io_service_wait_quiet */
mig_internal novalue _Xio_service_wait_quiet
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_timespec_t wait_time;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_wait_quiet_t __Request;
	typedef __Reply__io_service_wait_quiet_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_wait_quiet_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_wait_quiet_t__defined */

	__DeclareRcvRpc(2832, "io_service_wait_quiet")
	__BeforeRcvRpc(2832, "io_service_wait_quiet")

#if	defined(__MIG_check__Request__io_service_wait_quiet_t__defined)
	check_result = __MIG_check__Request__io_service_wait_quiet_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_wait_quiet_t__defined) */

	OutP->RetCode = is_io_service_wait_quiet(In0P->Head.msgh_request_port, In0P->wait_time);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2832, "io_service_wait_quiet")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_create_iterator_t__defined)
#define __MIG_check__Request__io_registry_entry_create_iterator_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_create_iterator_t(__attribute__((__unused__)) __Request__io_registry_entry_create_iterator_t *In0P, __attribute__((__unused__)) __Request__io_registry_entry_create_iterator_t **In1PP)
{

	typedef __Request__io_registry_entry_create_iterator_t __Request;
	__Request *In1P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_create_iterator_t__planeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_create_iterator_t__planeCnt(&In0P->planeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_create_iterator_t__planeCnt__defined */
	msgh_size_delta = _WALIGN_(In0P->planeCnt);
#if	__MigTypeCheck
	if ( In0P->planeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->planeCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->planeCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 128);

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->plane),  128);
		if (( memchr(In0P->plane, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_create_iterator_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_create_iterator */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_create_iterator
(
	mach_port_t registry_entry,
	io_name_t plane,
	uint32_t options,
	mach_port_t *iterator
);

/* Routine io_registry_entry_create_iterator */
mig_internal novalue _Xio_registry_entry_create_iterator
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		uint32_t options;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_create_iterator_t __Request;
	typedef __Reply__io_registry_entry_create_iterator_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_create_iterator_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_create_iterator_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t iteratorTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2833, "io_registry_entry_create_iterator")
	__BeforeRcvRpc(2833, "io_registry_entry_create_iterator")

#if	defined(__MIG_check__Request__io_registry_entry_create_iterator_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_create_iterator_t((__Request *)In0P, (__Request **)&In1P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_create_iterator_t__defined) */

#if	UseStaticTemplates
	OutP->iterator = iteratorTemplate;
#else	/* UseStaticTemplates */
	OutP->iterator.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->iterator.pad1 = 0;
#endif
	OutP->iterator.pad2 = 0;
	OutP->iterator.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->iterator.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_entry_create_iterator(In0P->Head.msgh_request_port, In0P->plane, In1P->options, &OutP->iterator.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2833, "io_registry_entry_create_iterator")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_iterator_is_valid_t__defined)
#define __MIG_check__Request__io_iterator_is_valid_t__defined

mig_internal kern_return_t __MIG_check__Request__io_iterator_is_valid_t(__attribute__((__unused__)) __Request__io_iterator_is_valid_t *In0P)
{

	typedef __Request__io_iterator_is_valid_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_iterator_is_valid_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_iterator_is_valid */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_iterator_is_valid
(
	mach_port_t iterator,
	boolean_t *is_valid
);

/* Routine io_iterator_is_valid */
mig_internal novalue _Xio_iterator_is_valid
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_iterator_is_valid_t __Request;
	typedef __Reply__io_iterator_is_valid_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_iterator_is_valid_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_iterator_is_valid_t__defined */

	__DeclareRcvRpc(2834, "io_iterator_is_valid")
	__BeforeRcvRpc(2834, "io_iterator_is_valid")

#if	defined(__MIG_check__Request__io_iterator_is_valid_t__defined)
	check_result = __MIG_check__Request__io_iterator_is_valid_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_iterator_is_valid_t__defined) */

	OutP->RetCode = is_io_iterator_is_valid(In0P->Head.msgh_request_port, &OutP->is_valid);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2834, "io_iterator_is_valid")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_catalog_send_data_t__defined)
#define __MIG_check__Request__io_catalog_send_data_t__defined

mig_internal kern_return_t __MIG_check__Request__io_catalog_send_data_t(__attribute__((__unused__)) __Request__io_catalog_send_data_t *In0P)
{

	typedef __Request__io_catalog_send_data_t __Request;
#if	__MigTypeCheck
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->inData.type != MACH_MSG_OOL_DESCRIPTOR)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	if (In0P->inData.size != In0P->inDataCnt)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_catalog_send_data_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_catalog_send_data */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_catalog_send_data
(
	mach_port_t master_port,
	uint32_t flag,
	io_buf_ptr_t inData,
	mach_msg_type_number_t inDataCnt,
	kern_return_t *result
);

/* Routine io_catalog_send_data */
mig_internal novalue _Xio_catalog_send_data
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t inData;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		uint32_t flag;
		mach_msg_type_number_t inDataCnt;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_catalog_send_data_t __Request;
	typedef __Reply__io_catalog_send_data_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_catalog_send_data_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_catalog_send_data_t__defined */

	__DeclareRcvRpc(2836, "io_catalog_send_data")
	__BeforeRcvRpc(2836, "io_catalog_send_data")

#if	defined(__MIG_check__Request__io_catalog_send_data_t__defined)
	check_result = __MIG_check__Request__io_catalog_send_data_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_catalog_send_data_t__defined) */

	OutP->RetCode = is_io_catalog_send_data(In0P->Head.msgh_request_port, In0P->flag, (io_buf_ptr_t)(In0P->inData.address), In0P->inData.size, &OutP->result);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2836, "io_catalog_send_data")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_catalog_terminate_t__defined)
#define __MIG_check__Request__io_catalog_terminate_t__defined

mig_internal kern_return_t __MIG_check__Request__io_catalog_terminate_t(__attribute__((__unused__)) __Request__io_catalog_terminate_t *In0P)
{

	typedef __Request__io_catalog_terminate_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_catalog_terminate_t__nameCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_catalog_terminate_t__nameCnt(&In0P->nameCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_catalog_terminate_t__nameCnt__defined */
#if	__MigTypeCheck
	if ( In0P->nameCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->nameCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->nameCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->name),  128);
		if (( memchr(In0P->name, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_catalog_terminate_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_catalog_terminate */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_catalog_terminate
(
	mach_port_t master_port,
	uint32_t flag,
	io_name_t name
);

/* Routine io_catalog_terminate */
mig_internal novalue _Xio_catalog_terminate
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t flag;
		mach_msg_type_number_t nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t nameCnt;
		char name[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_catalog_terminate_t __Request;
	typedef __Reply__io_catalog_terminate_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_catalog_terminate_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_catalog_terminate_t__defined */

	__DeclareRcvRpc(2837, "io_catalog_terminate")
	__BeforeRcvRpc(2837, "io_catalog_terminate")

#if	defined(__MIG_check__Request__io_catalog_terminate_t__defined)
	check_result = __MIG_check__Request__io_catalog_terminate_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_catalog_terminate_t__defined) */

	OutP->RetCode = is_io_catalog_terminate(In0P->Head.msgh_request_port, In0P->flag, In0P->name);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2837, "io_catalog_terminate")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_catalog_get_data_t__defined)
#define __MIG_check__Request__io_catalog_get_data_t__defined

mig_internal kern_return_t __MIG_check__Request__io_catalog_get_data_t(__attribute__((__unused__)) __Request__io_catalog_get_data_t *In0P)
{

	typedef __Request__io_catalog_get_data_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_catalog_get_data_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_catalog_get_data */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_catalog_get_data
(
	mach_port_t master_port,
	uint32_t flag,
	io_buf_ptr_t *outData,
	mach_msg_type_number_t *outDataCnt
);

/* Routine io_catalog_get_data */
mig_internal novalue _Xio_catalog_get_data
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t flag;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_catalog_get_data_t __Request;
	typedef __Reply__io_catalog_get_data_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_catalog_get_data_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_catalog_get_data_t__defined */

#if	UseStaticTemplates
	const static mach_msg_ool_descriptor_t outDataTemplate = {
		/* addr = */		(void *)0,
		/* size = */		0,
		/* deal = */		FALSE,
		/* copy = */		MACH_MSG_VIRTUAL_COPY,
		/* pad2 = */		0,
		/* type = */		MACH_MSG_OOL_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2838, "io_catalog_get_data")
	__BeforeRcvRpc(2838, "io_catalog_get_data")

#if	defined(__MIG_check__Request__io_catalog_get_data_t__defined)
	check_result = __MIG_check__Request__io_catalog_get_data_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_catalog_get_data_t__defined) */

#if	UseStaticTemplates
	OutP->outData = outDataTemplate;
#else	/* UseStaticTemplates */
	OutP->outData.deallocate =  FALSE;
	OutP->outData.copy = MACH_MSG_VIRTUAL_COPY;
	OutP->outData.pad1 = 0;
	OutP->outData.type = MACH_MSG_OOL_DESCRIPTOR;
#if defined(KERNEL) && !defined(__LP64__)
	OutP->outData.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_catalog_get_data(In0P->Head.msgh_request_port, In0P->flag, (io_buf_ptr_t *)&(OutP->outData.address), &OutP->outDataCnt);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}
	OutP->outData.size = OutP->outDataCnt;

	OutP->NDR = NDR_record;

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2838, "io_catalog_get_data")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_catalog_get_gen_count_t__defined)
#define __MIG_check__Request__io_catalog_get_gen_count_t__defined

mig_internal kern_return_t __MIG_check__Request__io_catalog_get_gen_count_t(__attribute__((__unused__)) __Request__io_catalog_get_gen_count_t *In0P)
{

	typedef __Request__io_catalog_get_gen_count_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_catalog_get_gen_count_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_catalog_get_gen_count */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_catalog_get_gen_count
(
	mach_port_t master_port,
	uint32_t *genCount
);

/* Routine io_catalog_get_gen_count */
mig_internal novalue _Xio_catalog_get_gen_count
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_catalog_get_gen_count_t __Request;
	typedef __Reply__io_catalog_get_gen_count_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_catalog_get_gen_count_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_catalog_get_gen_count_t__defined */

	__DeclareRcvRpc(2839, "io_catalog_get_gen_count")
	__BeforeRcvRpc(2839, "io_catalog_get_gen_count")

#if	defined(__MIG_check__Request__io_catalog_get_gen_count_t__defined)
	check_result = __MIG_check__Request__io_catalog_get_gen_count_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_catalog_get_gen_count_t__defined) */

	OutP->RetCode = is_io_catalog_get_gen_count(In0P->Head.msgh_request_port, &OutP->genCount);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2839, "io_catalog_get_gen_count")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_catalog_module_loaded_t__defined)
#define __MIG_check__Request__io_catalog_module_loaded_t__defined

mig_internal kern_return_t __MIG_check__Request__io_catalog_module_loaded_t(__attribute__((__unused__)) __Request__io_catalog_module_loaded_t *In0P)
{

	typedef __Request__io_catalog_module_loaded_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_catalog_module_loaded_t__nameCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_catalog_module_loaded_t__nameCnt(&In0P->nameCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_catalog_module_loaded_t__nameCnt__defined */
#if	__MigTypeCheck
	if ( In0P->nameCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->nameCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->nameCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->name),  128);
		if (( memchr(In0P->name, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_catalog_module_loaded_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_catalog_module_loaded */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_catalog_module_loaded
(
	mach_port_t master_port,
	io_name_t name
);

/* Routine io_catalog_module_loaded */
mig_internal novalue _Xio_catalog_module_loaded
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t nameCnt;
		char name[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_catalog_module_loaded_t __Request;
	typedef __Reply__io_catalog_module_loaded_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_catalog_module_loaded_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_catalog_module_loaded_t__defined */

	__DeclareRcvRpc(2840, "io_catalog_module_loaded")
	__BeforeRcvRpc(2840, "io_catalog_module_loaded")

#if	defined(__MIG_check__Request__io_catalog_module_loaded_t__defined)
	check_result = __MIG_check__Request__io_catalog_module_loaded_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_catalog_module_loaded_t__defined) */

	OutP->RetCode = is_io_catalog_module_loaded(In0P->Head.msgh_request_port, In0P->name);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2840, "io_catalog_module_loaded")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_catalog_reset_t__defined)
#define __MIG_check__Request__io_catalog_reset_t__defined

mig_internal kern_return_t __MIG_check__Request__io_catalog_reset_t(__attribute__((__unused__)) __Request__io_catalog_reset_t *In0P)
{

	typedef __Request__io_catalog_reset_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_catalog_reset_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_catalog_reset */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_catalog_reset
(
	mach_port_t master_port,
	uint32_t flag
);

/* Routine io_catalog_reset */
mig_internal novalue _Xio_catalog_reset
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t flag;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_catalog_reset_t __Request;
	typedef __Reply__io_catalog_reset_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_catalog_reset_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_catalog_reset_t__defined */

	__DeclareRcvRpc(2841, "io_catalog_reset")
	__BeforeRcvRpc(2841, "io_catalog_reset")

#if	defined(__MIG_check__Request__io_catalog_reset_t__defined)
	check_result = __MIG_check__Request__io_catalog_reset_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_catalog_reset_t__defined) */

	OutP->RetCode = is_io_catalog_reset(In0P->Head.msgh_request_port, In0P->flag);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2841, "io_catalog_reset")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_request_probe_t__defined)
#define __MIG_check__Request__io_service_request_probe_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_request_probe_t(__attribute__((__unused__)) __Request__io_service_request_probe_t *In0P)
{

	typedef __Request__io_service_request_probe_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_request_probe_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_request_probe */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_request_probe
(
	mach_port_t service,
	uint32_t options
);

/* Routine io_service_request_probe */
mig_internal novalue _Xio_service_request_probe
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t options;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_request_probe_t __Request;
	typedef __Reply__io_service_request_probe_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_request_probe_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_request_probe_t__defined */

	__DeclareRcvRpc(2842, "io_service_request_probe")
	__BeforeRcvRpc(2842, "io_service_request_probe")

#if	defined(__MIG_check__Request__io_service_request_probe_t__defined)
	check_result = __MIG_check__Request__io_service_request_probe_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_request_probe_t__defined) */

	OutP->RetCode = is_io_service_request_probe(In0P->Head.msgh_request_port, In0P->options);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2842, "io_service_request_probe")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined)
#define __MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_name_in_plane_t(__attribute__((__unused__)) __Request__io_registry_entry_get_name_in_plane_t *In0P)
{

	typedef __Request__io_registry_entry_get_name_in_plane_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_name_in_plane_t__planeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_name_in_plane_t__planeCnt(&In0P->planeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_name_in_plane_t__planeCnt__defined */
#if	__MigTypeCheck
	if ( In0P->planeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->planeCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->planeCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->plane),  128);
		if (( memchr(In0P->plane, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_name_in_plane */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_name_in_plane
(
	mach_port_t registry_entry,
	io_name_t plane,
	io_name_t name
);

/* Routine io_registry_entry_get_name_in_plane */
mig_internal novalue _Xio_registry_entry_get_name_in_plane
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_name_in_plane_t __Request;
	typedef __Reply__io_registry_entry_get_name_in_plane_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined */

	__DeclareRcvRpc(2843, "io_registry_entry_get_name_in_plane")
	__BeforeRcvRpc(2843, "io_registry_entry_get_name_in_plane")

#if	defined(__MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_name_in_plane_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_name_in_plane_t__defined) */

	OutP->RetCode = is_io_registry_entry_get_name_in_plane(In0P->Head.msgh_request_port, In0P->plane, OutP->name);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

#ifdef __LP64__
	{
		size_t strLength = strlen(OutP->name) + 1;
		if (strLength > 0xffffffff)
			MIG_RETURN_ERROR(OutP, MIG_BAD_ARGUMENTS);
		OutP->nameCnt = (mach_msg_type_number_t) strLength;
	}
#else
	OutP->nameCnt = (mach_msg_type_number_t) strlen(OutP->name) + 1;
#endif /* __LP64__ */
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutP->nameCnt + 3) & ~3));

	__AfterRcvRpc(2843, "io_registry_entry_get_name_in_plane")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_match_property_table_t__defined)
#define __MIG_check__Request__io_service_match_property_table_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_match_property_table_t(__attribute__((__unused__)) __Request__io_service_match_property_table_t *In0P)
{

	typedef __Request__io_service_match_property_table_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 512)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_service_match_property_table_t__matchingCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_match_property_table_t__matchingCnt(&In0P->matchingCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_match_property_table_t__matchingCnt__defined */
#if	__MigTypeCheck
	if ( In0P->matchingCnt > 512 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 512)) < In0P->matchingCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 512) + _WALIGN_(In0P->matchingCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->matching),  512);
		if (( memchr(In0P->matching, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_match_property_table_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_match_property_table */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_match_property_table
(
	mach_port_t service,
	io_string_t matching,
	boolean_t *matches
);

/* Routine io_service_match_property_table */
mig_internal novalue _Xio_service_match_property_table
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
		mach_msg_type_number_t matchingCnt;
		char matching[512];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_match_property_table_t __Request;
	typedef __Reply__io_service_match_property_table_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_match_property_table_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_match_property_table_t__defined */

	__DeclareRcvRpc(2844, "io_service_match_property_table")
	__BeforeRcvRpc(2844, "io_service_match_property_table")

#if	defined(__MIG_check__Request__io_service_match_property_table_t__defined)
	check_result = __MIG_check__Request__io_service_match_property_table_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_match_property_table_t__defined) */

	OutP->RetCode = is_io_service_match_property_table(In0P->Head.msgh_request_port, In0P->matching, &OutP->matches);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2844, "io_service_match_property_table")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_connect_get_notification_semaphore_t__defined)
#define __MIG_check__Request__io_connect_get_notification_semaphore_t__defined

mig_internal kern_return_t __MIG_check__Request__io_connect_get_notification_semaphore_t(__attribute__((__unused__)) __Request__io_connect_get_notification_semaphore_t *In0P)
{

	typedef __Request__io_connect_get_notification_semaphore_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_connect_get_notification_semaphore_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_connect_get_notification_semaphore */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_connect_get_notification_semaphore
(
	mach_port_t connection,
	natural_t notification_type,
	semaphore_t *semaphore
);

/* Routine io_connect_get_notification_semaphore */
mig_internal novalue _Xio_connect_get_notification_semaphore
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		natural_t notification_type;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_connect_get_notification_semaphore_t __Request;
	typedef __Reply__io_connect_get_notification_semaphore_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_connect_get_notification_semaphore_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_connect_get_notification_semaphore_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t semaphoreTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2852, "io_connect_get_notification_semaphore")
	__BeforeRcvRpc(2852, "io_connect_get_notification_semaphore")

#if	defined(__MIG_check__Request__io_connect_get_notification_semaphore_t__defined)
	check_result = __MIG_check__Request__io_connect_get_notification_semaphore_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_connect_get_notification_semaphore_t__defined) */

#if	UseStaticTemplates
	OutP->semaphore = semaphoreTemplate;
#else	/* UseStaticTemplates */
	OutP->semaphore.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->semaphore.pad1 = 0;
#endif
	OutP->semaphore.pad2 = 0;
	OutP->semaphore.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->semaphore.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_connect_get_notification_semaphore(In0P->Head.msgh_request_port, In0P->notification_type, &OutP->semaphore.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2852, "io_connect_get_notification_semaphore")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined)
#define __MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_location_in_plane_t(__attribute__((__unused__)) __Request__io_registry_entry_get_location_in_plane_t *In0P)
{

	typedef __Request__io_registry_entry_get_location_in_plane_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_location_in_plane_t__planeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_location_in_plane_t__planeCnt(&In0P->planeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_location_in_plane_t__planeCnt__defined */
#if	__MigTypeCheck
	if ( In0P->planeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->planeCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->planeCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->plane),  128);
		if (( memchr(In0P->plane, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_location_in_plane */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_location_in_plane
(
	mach_port_t registry_entry,
	io_name_t plane,
	io_name_t location
);

/* Routine io_registry_entry_get_location_in_plane */
mig_internal novalue _Xio_registry_entry_get_location_in_plane
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_location_in_plane_t __Request;
	typedef __Reply__io_registry_entry_get_location_in_plane_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined */

	__DeclareRcvRpc(2854, "io_registry_entry_get_location_in_plane")
	__BeforeRcvRpc(2854, "io_registry_entry_get_location_in_plane")

#if	defined(__MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_location_in_plane_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_location_in_plane_t__defined) */

	OutP->RetCode = is_io_registry_entry_get_location_in_plane(In0P->Head.msgh_request_port, In0P->plane, OutP->location);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

#ifdef __LP64__
	{
		size_t strLength = strlen(OutP->location) + 1;
		if (strLength > 0xffffffff)
			MIG_RETURN_ERROR(OutP, MIG_BAD_ARGUMENTS);
		OutP->locationCnt = (mach_msg_type_number_t) strLength;
	}
#else
	OutP->locationCnt = (mach_msg_type_number_t) strlen(OutP->location) + 1;
#endif /* __LP64__ */
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutP->locationCnt + 3) & ~3));

	__AfterRcvRpc(2854, "io_registry_entry_get_location_in_plane")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_property_recursively_t__defined)
#define __MIG_check__Request__io_registry_entry_get_property_recursively_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_property_recursively_t(__attribute__((__unused__)) __Request__io_registry_entry_get_property_recursively_t *In0P, __attribute__((__unused__)) __Request__io_registry_entry_get_property_recursively_t **In1PP, __attribute__((__unused__)) __Request__io_registry_entry_get_property_recursively_t **In2PP)
{

	typedef __Request__io_registry_entry_get_property_recursively_t __Request;
	__Request *In1P;
	__Request *In2P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 256)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__planeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__planeCnt(&In0P->planeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__planeCnt__defined */
	msgh_size_delta = _WALIGN_(In0P->planeCnt);
#if	__MigTypeCheck
	if ( In0P->planeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 256)) < In0P->planeCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 256) + _WALIGN_(In0P->planeCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 128);

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__property_nameCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__property_nameCnt(&In1P->property_nameCnt, In1P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_property_recursively_t__property_nameCnt__defined */
	msgh_size_delta = _WALIGN_(In1P->property_nameCnt);
#if	__MigTypeCheck
	if ( In1P->property_nameCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 256)) < In1P->property_nameCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 256) + _WALIGN_(In1P->property_nameCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	*In2PP = In2P = (__Request *) ((pointer_t) In1P + msgh_size_delta - 128);

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->plane),  128);
		if (( memchr(In0P->plane, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
		memchr_limit = min((msg_limit - In1P->property_name),  128);
		if (( memchr(In1P->property_name, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_property_recursively_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_property_recursively */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_property_recursively
(
	mach_port_t registry_entry,
	io_name_t plane,
	io_name_t property_name,
	uint32_t options,
	io_buf_ptr_t *properties,
	mach_msg_type_number_t *propertiesCnt
);

/* Routine io_registry_entry_get_property_recursively */
mig_internal novalue _Xio_registry_entry_get_property_recursively
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t property_nameCnt;
		char property_name[128];
		uint32_t options;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_property_recursively_t __Request;
	typedef __Reply__io_registry_entry_get_property_recursively_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Request *In2P;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_property_recursively_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_property_recursively_t__defined */

#if	UseStaticTemplates
	const static mach_msg_ool_descriptor_t propertiesTemplate = {
		/* addr = */		(void *)0,
		/* size = */		0,
		/* deal = */		FALSE,
		/* copy = */		MACH_MSG_PHYSICAL_COPY,
		/* pad2 = */		0,
		/* type = */		MACH_MSG_OOL_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2855, "io_registry_entry_get_property_recursively")
	__BeforeRcvRpc(2855, "io_registry_entry_get_property_recursively")

#if	defined(__MIG_check__Request__io_registry_entry_get_property_recursively_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_property_recursively_t((__Request *)In0P, (__Request **)&In1P, (__Request **)&In2P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_property_recursively_t__defined) */

#if	UseStaticTemplates
	OutP->properties = propertiesTemplate;
#else	/* UseStaticTemplates */
	OutP->properties.deallocate =  FALSE;
	OutP->properties.copy = MACH_MSG_PHYSICAL_COPY;
	OutP->properties.pad1 = 0;
	OutP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
#if defined(KERNEL) && !defined(__LP64__)
	OutP->properties.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_entry_get_property_recursively(In0P->Head.msgh_request_port, In0P->plane, In1P->property_name, In2P->options, (io_buf_ptr_t *)&(OutP->properties.address), &OutP->propertiesCnt);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}
	OutP->properties.size = OutP->propertiesCnt;

	OutP->NDR = NDR_record;

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2855, "io_registry_entry_get_property_recursively")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_get_state_t__defined)
#define __MIG_check__Request__io_service_get_state_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_get_state_t(__attribute__((__unused__)) __Request__io_service_get_state_t *In0P)
{

	typedef __Request__io_service_get_state_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_get_state_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_get_state */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_get_state
(
	mach_port_t service,
	uint64_t *state,
	uint32_t *busy_state,
	uint64_t *accumulated_busy_time
);

/* Routine io_service_get_state */
mig_internal novalue _Xio_service_get_state
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_get_state_t __Request;
	typedef __Reply__io_service_get_state_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_get_state_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_get_state_t__defined */

	__DeclareRcvRpc(2856, "io_service_get_state")
	__BeforeRcvRpc(2856, "io_service_get_state")

#if	defined(__MIG_check__Request__io_service_get_state_t__defined)
	check_result = __MIG_check__Request__io_service_get_state_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_get_state_t__defined) */

	OutP->RetCode = is_io_service_get_state(In0P->Head.msgh_request_port, &OutP->state, &OutP->busy_state, &OutP->accumulated_busy_time);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2856, "io_service_get_state")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_get_matching_services_ool_t__defined)
#define __MIG_check__Request__io_service_get_matching_services_ool_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_services_ool_t(__attribute__((__unused__)) __Request__io_service_get_matching_services_ool_t *In0P)
{

	typedef __Request__io_service_get_matching_services_ool_t __Request;
#if	__MigTypeCheck
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->matching.type != MACH_MSG_OOL_DESCRIPTOR)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	if (In0P->matching.size != In0P->matchingCnt)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_get_matching_services_ool_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_get_matching_services_ool */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_get_matching_services_ool
(
	mach_port_t master_port,
	io_buf_ptr_t matching,
	mach_msg_type_number_t matchingCnt,
	kern_return_t *result,
	mach_port_t *existing
);

/* Routine io_service_get_matching_services_ool */
mig_internal novalue _Xio_service_get_matching_services_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t matching;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_get_matching_services_ool_t __Request;
	typedef __Reply__io_service_get_matching_services_ool_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_get_matching_services_ool_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_get_matching_services_ool_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t existingTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2857, "io_service_get_matching_services_ool")
	__BeforeRcvRpc(2857, "io_service_get_matching_services_ool")

#if	defined(__MIG_check__Request__io_service_get_matching_services_ool_t__defined)
	check_result = __MIG_check__Request__io_service_get_matching_services_ool_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_get_matching_services_ool_t__defined) */

#if	UseStaticTemplates
	OutP->existing = existingTemplate;
#else	/* UseStaticTemplates */
	OutP->existing.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->existing.pad1 = 0;
#endif
	OutP->existing.pad2 = 0;
	OutP->existing.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->existing.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_service_get_matching_services_ool(In0P->Head.msgh_request_port, (io_buf_ptr_t)(In0P->matching.address), In0P->matching.size, &OutP->result, &OutP->existing.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2857, "io_service_get_matching_services_ool")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_match_property_table_ool_t__defined)
#define __MIG_check__Request__io_service_match_property_table_ool_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_match_property_table_ool_t(__attribute__((__unused__)) __Request__io_service_match_property_table_ool_t *In0P)
{

	typedef __Request__io_service_match_property_table_ool_t __Request;
#if	__MigTypeCheck
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->matching.type != MACH_MSG_OOL_DESCRIPTOR)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	if (In0P->matching.size != In0P->matchingCnt)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_match_property_table_ool_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_match_property_table_ool */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_match_property_table_ool
(
	mach_port_t service,
	io_buf_ptr_t matching,
	mach_msg_type_number_t matchingCnt,
	kern_return_t *result,
	boolean_t *matches
);

/* Routine io_service_match_property_table_ool */
mig_internal novalue _Xio_service_match_property_table_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t matching;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_match_property_table_ool_t __Request;
	typedef __Reply__io_service_match_property_table_ool_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_match_property_table_ool_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_match_property_table_ool_t__defined */

	__DeclareRcvRpc(2858, "io_service_match_property_table_ool")
	__BeforeRcvRpc(2858, "io_service_match_property_table_ool")

#if	defined(__MIG_check__Request__io_service_match_property_table_ool_t__defined)
	check_result = __MIG_check__Request__io_service_match_property_table_ool_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_match_property_table_ool_t__defined) */

	OutP->RetCode = is_io_service_match_property_table_ool(In0P->Head.msgh_request_port, (io_buf_ptr_t)(In0P->matching.address), In0P->matching.size, &OutP->result, &OutP->matches);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2858, "io_service_match_property_table_ool")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_object_get_superclass_t__defined)
#define __MIG_check__Request__io_object_get_superclass_t__defined

mig_internal kern_return_t __MIG_check__Request__io_object_get_superclass_t(__attribute__((__unused__)) __Request__io_object_get_superclass_t *In0P)
{

	typedef __Request__io_object_get_superclass_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_object_get_superclass_t__obj_nameCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_object_get_superclass_t__obj_nameCnt(&In0P->obj_nameCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_object_get_superclass_t__obj_nameCnt__defined */
#if	__MigTypeCheck
	if ( In0P->obj_nameCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->obj_nameCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->obj_nameCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->obj_name),  128);
		if (( memchr(In0P->obj_name, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_object_get_superclass_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_object_get_superclass */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_object_get_superclass
(
	mach_port_t master_port,
	io_name_t obj_name,
	io_name_t class_name
);

/* Routine io_object_get_superclass */
mig_internal novalue _Xio_object_get_superclass
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t obj_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t obj_nameCnt;
		char obj_name[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_object_get_superclass_t __Request;
	typedef __Reply__io_object_get_superclass_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_object_get_superclass_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_object_get_superclass_t__defined */

	__DeclareRcvRpc(2860, "io_object_get_superclass")
	__BeforeRcvRpc(2860, "io_object_get_superclass")

#if	defined(__MIG_check__Request__io_object_get_superclass_t__defined)
	check_result = __MIG_check__Request__io_object_get_superclass_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_object_get_superclass_t__defined) */

	OutP->RetCode = is_io_object_get_superclass(In0P->Head.msgh_request_port, In0P->obj_name, OutP->class_name);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

#ifdef __LP64__
	{
		size_t strLength = strlen(OutP->class_name) + 1;
		if (strLength > 0xffffffff)
			MIG_RETURN_ERROR(OutP, MIG_BAD_ARGUMENTS);
		OutP->class_nameCnt = (mach_msg_type_number_t) strLength;
	}
#else
	OutP->class_nameCnt = (mach_msg_type_number_t) strlen(OutP->class_name) + 1;
#endif /* __LP64__ */
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutP->class_nameCnt + 3) & ~3));

	__AfterRcvRpc(2860, "io_object_get_superclass")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_object_get_bundle_identifier_t__defined)
#define __MIG_check__Request__io_object_get_bundle_identifier_t__defined

mig_internal kern_return_t __MIG_check__Request__io_object_get_bundle_identifier_t(__attribute__((__unused__)) __Request__io_object_get_bundle_identifier_t *In0P)
{

	typedef __Request__io_object_get_bundle_identifier_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_object_get_bundle_identifier_t__obj_nameCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_object_get_bundle_identifier_t__obj_nameCnt(&In0P->obj_nameCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_object_get_bundle_identifier_t__obj_nameCnt__defined */
#if	__MigTypeCheck
	if ( In0P->obj_nameCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->obj_nameCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->obj_nameCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->obj_name),  128);
		if (( memchr(In0P->obj_name, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_object_get_bundle_identifier_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_object_get_bundle_identifier */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_object_get_bundle_identifier
(
	mach_port_t master_port,
	io_name_t obj_name,
	io_name_t class_name
);

/* Routine io_object_get_bundle_identifier */
mig_internal novalue _Xio_object_get_bundle_identifier
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t obj_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t obj_nameCnt;
		char obj_name[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_object_get_bundle_identifier_t __Request;
	typedef __Reply__io_object_get_bundle_identifier_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_object_get_bundle_identifier_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_object_get_bundle_identifier_t__defined */

	__DeclareRcvRpc(2861, "io_object_get_bundle_identifier")
	__BeforeRcvRpc(2861, "io_object_get_bundle_identifier")

#if	defined(__MIG_check__Request__io_object_get_bundle_identifier_t__defined)
	check_result = __MIG_check__Request__io_object_get_bundle_identifier_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_object_get_bundle_identifier_t__defined) */

	OutP->RetCode = is_io_object_get_bundle_identifier(In0P->Head.msgh_request_port, In0P->obj_name, OutP->class_name);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

#ifdef __LP64__
	{
		size_t strLength = strlen(OutP->class_name) + 1;
		if (strLength > 0xffffffff)
			MIG_RETURN_ERROR(OutP, MIG_BAD_ARGUMENTS);
		OutP->class_nameCnt = (mach_msg_type_number_t) strLength;
	}
#else
	OutP->class_nameCnt = (mach_msg_type_number_t) strlen(OutP->class_name) + 1;
#endif /* __LP64__ */
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 128) + (_WALIGN_((OutP->class_nameCnt + 3) & ~3));

	__AfterRcvRpc(2861, "io_object_get_bundle_identifier")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_open_extended_t__defined)
#define __MIG_check__Request__io_service_open_extended_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_open_extended_t(__attribute__((__unused__)) __Request__io_service_open_extended_t *In0P)
{

	typedef __Request__io_service_open_extended_t __Request;
#if	__MigTypeCheck
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 2) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->owningTask.type != MACH_MSG_PORT_DESCRIPTOR ||
	    In0P->owningTask.disposition != 17)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->properties.type != MACH_MSG_OOL_DESCRIPTOR)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	if (In0P->properties.size != In0P->propertiesCnt)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_open_extended_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_open_extended */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_open_extended
(
	mach_port_t service,
	task_t owningTask,
	uint32_t connect_type,
	NDR_record_t ndr,
	io_buf_ptr_t properties,
	mach_msg_type_number_t propertiesCnt,
	kern_return_t *result,
	mach_port_t *connection
);

/* Routine io_service_open_extended */
mig_internal novalue _Xio_service_open_extended
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t owningTask;
		mach_msg_ool_descriptor_t properties;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		uint32_t connect_type;
		NDR_record_t ndr;
		mach_msg_type_number_t propertiesCnt;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_open_extended_t __Request;
	typedef __Reply__io_service_open_extended_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_open_extended_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_open_extended_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t connectionTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2862, "io_service_open_extended")
	__BeforeRcvRpc(2862, "io_service_open_extended")

#if	defined(__MIG_check__Request__io_service_open_extended_t__defined)
	check_result = __MIG_check__Request__io_service_open_extended_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_open_extended_t__defined) */

#if	UseStaticTemplates
	OutP->connection = connectionTemplate;
#else	/* UseStaticTemplates */
	OutP->connection.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->connection.pad1 = 0;
#endif
	OutP->connection.pad2 = 0;
	OutP->connection.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->connection.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_service_open_extended(In0P->Head.msgh_request_port, In0P->owningTask.name, In0P->connect_type, In0P->ndr, (io_buf_ptr_t)(In0P->properties.address), In0P->properties.size, &OutP->result, &OutP->connection.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2862, "io_service_open_extended")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_connect_map_memory_into_task_t__defined)
#define __MIG_check__Request__io_connect_map_memory_into_task_t__defined

mig_internal kern_return_t __MIG_check__Request__io_connect_map_memory_into_task_t(__attribute__((__unused__)) __Request__io_connect_map_memory_into_task_t *In0P)
{

	typedef __Request__io_connect_map_memory_into_task_t __Request;
#if	__MigTypeCheck
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->into_task.type != MACH_MSG_PORT_DESCRIPTOR ||
	    In0P->into_task.disposition != 17)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_connect_map_memory_into_task_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_connect_map_memory_into_task */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_connect_map_memory_into_task
(
	mach_port_t connection,
	uint32_t memory_type,
	task_t into_task,
	mach_vm_address_t *address,
	mach_vm_size_t *size,
	uint32_t flags
);

/* Routine io_connect_map_memory_into_task */
mig_internal novalue _Xio_connect_map_memory_into_task
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t into_task;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		uint32_t memory_type;
		mach_vm_address_t address;
		mach_vm_size_t size;
		uint32_t flags;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_connect_map_memory_into_task_t __Request;
	typedef __Reply__io_connect_map_memory_into_task_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_connect_map_memory_into_task_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_connect_map_memory_into_task_t__defined */

	__DeclareRcvRpc(2863, "io_connect_map_memory_into_task")
	__BeforeRcvRpc(2863, "io_connect_map_memory_into_task")

#if	defined(__MIG_check__Request__io_connect_map_memory_into_task_t__defined)
	check_result = __MIG_check__Request__io_connect_map_memory_into_task_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_connect_map_memory_into_task_t__defined) */

	OutP->RetCode = is_io_connect_map_memory_into_task(In0P->Head.msgh_request_port, In0P->memory_type, In0P->into_task.name, &In0P->address, &In0P->size, In0P->flags);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->address = In0P->address;

	OutP->size = In0P->size;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2863, "io_connect_map_memory_into_task")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_connect_unmap_memory_from_task_t__defined)
#define __MIG_check__Request__io_connect_unmap_memory_from_task_t__defined

mig_internal kern_return_t __MIG_check__Request__io_connect_unmap_memory_from_task_t(__attribute__((__unused__)) __Request__io_connect_unmap_memory_from_task_t *In0P)
{

	typedef __Request__io_connect_unmap_memory_from_task_t __Request;
#if	__MigTypeCheck
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->from_task.type != MACH_MSG_PORT_DESCRIPTOR ||
	    In0P->from_task.disposition != 17)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_connect_unmap_memory_from_task_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_connect_unmap_memory_from_task */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_connect_unmap_memory_from_task
(
	mach_port_t connection,
	uint32_t memory_type,
	task_t from_task,
	mach_vm_address_t address
);

/* Routine io_connect_unmap_memory_from_task */
mig_internal novalue _Xio_connect_unmap_memory_from_task
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t from_task;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		uint32_t memory_type;
		mach_vm_address_t address;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_connect_unmap_memory_from_task_t __Request;
	typedef __Reply__io_connect_unmap_memory_from_task_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_connect_unmap_memory_from_task_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_connect_unmap_memory_from_task_t__defined */

	__DeclareRcvRpc(2864, "io_connect_unmap_memory_from_task")
	__BeforeRcvRpc(2864, "io_connect_unmap_memory_from_task")

#if	defined(__MIG_check__Request__io_connect_unmap_memory_from_task_t__defined)
	check_result = __MIG_check__Request__io_connect_unmap_memory_from_task_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_connect_unmap_memory_from_task_t__defined) */

	OutP->RetCode = is_io_connect_unmap_memory_from_task(In0P->Head.msgh_request_port, In0P->memory_type, In0P->from_task.name, In0P->address);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2864, "io_connect_unmap_memory_from_task")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_connect_method_t__defined)
#define __MIG_check__Request__io_connect_method_t__defined

mig_internal kern_return_t __MIG_check__Request__io_connect_method_t(__attribute__((__unused__)) __Request__io_connect_method_t *In0P, __attribute__((__unused__)) __Request__io_connect_method_t **In1PP, __attribute__((__unused__)) __Request__io_connect_method_t **In2PP)
{

	typedef __Request__io_connect_method_t __Request;
	__Request *In1P;
	__Request *In2P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4224)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_connect_method_t__scalar_inputCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_connect_method_t__scalar_inputCnt(&In0P->scalar_inputCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_connect_method_t__scalar_inputCnt__defined */
	msgh_size_delta = (8 * In0P->scalar_inputCnt);
#if	__MigTypeCheck
	if ( In0P->scalar_inputCnt > 16 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4224)) / 8 < In0P->scalar_inputCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4224) + (8 * In0P->scalar_inputCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 128);

#if defined(__NDR_convert__int_rep__Request__io_connect_method_t__inband_inputCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_connect_method_t__inband_inputCnt(&In1P->inband_inputCnt, In1P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_connect_method_t__inband_inputCnt__defined */
	msgh_size_delta = _WALIGN_(In1P->inband_inputCnt);
#if	__MigTypeCheck
	if ( In1P->inband_inputCnt > 4096 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4224)) < In1P->inband_inputCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4224) + _WALIGN_(In1P->inband_inputCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	*In2PP = In2P = (__Request *) ((pointer_t) In1P + msgh_size_delta - 4096);

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_connect_method_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_connect_method */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_connect_method
(
	mach_port_t connection,
	uint32_t selector,
	io_scalar_inband64_t scalar_input,
	mach_msg_type_number_t scalar_inputCnt,
	io_struct_inband_t inband_input,
	mach_msg_type_number_t inband_inputCnt,
	mach_vm_address_t ool_input,
	mach_vm_size_t ool_input_size,
	io_struct_inband_t inband_output,
	mach_msg_type_number_t *inband_outputCnt,
	io_scalar_inband64_t scalar_output,
	mach_msg_type_number_t *scalar_outputCnt,
	mach_vm_address_t ool_output,
	mach_vm_size_t *ool_output_size
);

/* Routine io_connect_method */
mig_internal novalue _Xio_connect_method
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t selector;
		mach_msg_type_number_t scalar_inputCnt;
		io_user_scalar_t scalar_input[16];
		mach_msg_type_number_t inband_inputCnt;
		char inband_input[4096];
		mach_vm_address_t ool_input;
		mach_vm_size_t ool_input_size;
		mach_msg_type_number_t inband_outputCnt;
		mach_msg_type_number_t scalar_outputCnt;
		mach_vm_address_t ool_output;
		mach_vm_size_t ool_output_size;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_connect_method_t __Request;
	typedef __Reply__io_connect_method_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Request *In2P;
	Reply *OutP = (Reply *) OutHeadP;
	unsigned int msgh_size;
	unsigned int msgh_size_delta;

#ifdef	__MIG_check__Request__io_connect_method_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_connect_method_t__defined */

	io_user_scalar_t scalar_output[16];
	mach_msg_type_number_t scalar_outputCnt;

	__DeclareRcvRpc(2865, "io_connect_method")
	__BeforeRcvRpc(2865, "io_connect_method")

#if	defined(__MIG_check__Request__io_connect_method_t__defined)
	check_result = __MIG_check__Request__io_connect_method_t((__Request *)In0P, (__Request **)&In1P, (__Request **)&In2P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_connect_method_t__defined) */

	OutP->inband_outputCnt = 4096;
	if (In2P->inband_outputCnt < OutP->inband_outputCnt)
		OutP->inband_outputCnt = In2P->inband_outputCnt;

	scalar_outputCnt = 16;
	if (In2P->scalar_outputCnt < scalar_outputCnt)
		scalar_outputCnt = In2P->scalar_outputCnt;

	OutP->RetCode = is_io_connect_method(In0P->Head.msgh_request_port, In0P->selector, In0P->scalar_input, In0P->scalar_inputCnt, In1P->inband_input, In1P->inband_inputCnt, In2P->ool_input, In2P->ool_input_size, OutP->inband_output, &OutP->inband_outputCnt, scalar_output, &scalar_outputCnt, In2P->ool_output, &In2P->ool_output_size);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	msgh_size_delta = _WALIGN_((OutP->inband_outputCnt + 3) & ~3);
	msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4224) + msgh_size_delta;
	OutP = (Reply *) ((pointer_t) OutP + msgh_size_delta - 4096);
	(void)memcpy((char *) OutP->scalar_output, (const char *) scalar_output, 8 * scalar_outputCnt);
	OutP->scalar_outputCnt = scalar_outputCnt;
	msgh_size_delta = ((8 * scalar_outputCnt));
	msgh_size += msgh_size_delta;
	OutP = (Reply *) ((pointer_t) OutP + msgh_size_delta - 128);

	OutP->ool_output_size = In2P->ool_output_size;

	OutP = (Reply *) OutHeadP;
	OutP->Head.msgh_size = msgh_size;
	__AfterRcvRpc(2865, "io_connect_method")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_connect_async_method_t__defined)
#define __MIG_check__Request__io_connect_async_method_t__defined

mig_internal kern_return_t __MIG_check__Request__io_connect_async_method_t(__attribute__((__unused__)) __Request__io_connect_async_method_t *In0P, __attribute__((__unused__)) __Request__io_connect_async_method_t **In1PP, __attribute__((__unused__)) __Request__io_connect_async_method_t **In2PP, __attribute__((__unused__)) __Request__io_connect_async_method_t **In3PP)
{

	typedef __Request__io_connect_async_method_t __Request;
	__Request *In1P;
	__Request *In2P;
	__Request *In3P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
	    In0P->wake_port.disposition != 17)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_connect_async_method_t__referenceCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_connect_async_method_t__referenceCnt(&In0P->referenceCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_connect_async_method_t__referenceCnt__defined */
	msgh_size_delta = (8 * In0P->referenceCnt);
#if	__MigTypeCheck
	if ( In0P->referenceCnt > 8 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) / 8 < In0P->referenceCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288) + (8 * In0P->referenceCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 64);

#if defined(__NDR_convert__int_rep__Request__io_connect_async_method_t__scalar_inputCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_connect_async_method_t__scalar_inputCnt(&In1P->scalar_inputCnt, In1P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_connect_async_method_t__scalar_inputCnt__defined */
	msgh_size_delta = (8 * In1P->scalar_inputCnt);
#if	__MigTypeCheck
	if ( In1P->scalar_inputCnt > 16 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) / 8 < In1P->scalar_inputCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288) + (8 * In1P->scalar_inputCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In2PP = In2P = (__Request *) ((pointer_t) In1P + msgh_size_delta - 128);

#if defined(__NDR_convert__int_rep__Request__io_connect_async_method_t__inband_inputCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_connect_async_method_t__inband_inputCnt(&In2P->inband_inputCnt, In2P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_connect_async_method_t__inband_inputCnt__defined */
	msgh_size_delta = _WALIGN_(In2P->inband_inputCnt);
#if	__MigTypeCheck
	if ( In2P->inband_inputCnt > 4096 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) < In2P->inband_inputCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4288) + _WALIGN_(In2P->inband_inputCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	*In3PP = In3P = (__Request *) ((pointer_t) In2P + msgh_size_delta - 4096);

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_connect_async_method_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_connect_async_method */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_connect_async_method
(
	mach_port_t connection,
	mach_port_t wake_port,
	io_async_ref64_t reference,
	mach_msg_type_number_t referenceCnt,
	uint32_t selector,
	io_scalar_inband64_t scalar_input,
	mach_msg_type_number_t scalar_inputCnt,
	io_struct_inband_t inband_input,
	mach_msg_type_number_t inband_inputCnt,
	mach_vm_address_t ool_input,
	mach_vm_size_t ool_input_size,
	io_struct_inband_t inband_output,
	mach_msg_type_number_t *inband_outputCnt,
	io_scalar_inband64_t scalar_output,
	mach_msg_type_number_t *scalar_outputCnt,
	mach_vm_address_t ool_output,
	mach_vm_size_t *ool_output_size
);

/* Routine io_connect_async_method */
mig_internal novalue _Xio_connect_async_method
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t wake_port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t referenceCnt;
		io_user_reference_t reference[8];
		uint32_t selector;
		mach_msg_type_number_t scalar_inputCnt;
		io_user_scalar_t scalar_input[16];
		mach_msg_type_number_t inband_inputCnt;
		char inband_input[4096];
		mach_vm_address_t ool_input;
		mach_vm_size_t ool_input_size;
		mach_msg_type_number_t inband_outputCnt;
		mach_msg_type_number_t scalar_outputCnt;
		mach_vm_address_t ool_output;
		mach_vm_size_t ool_output_size;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_connect_async_method_t __Request;
	typedef __Reply__io_connect_async_method_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Request *In2P;
	Request *In3P;
	Reply *OutP = (Reply *) OutHeadP;
	unsigned int msgh_size;
	unsigned int msgh_size_delta;

#ifdef	__MIG_check__Request__io_connect_async_method_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_connect_async_method_t__defined */

	io_user_scalar_t scalar_output[16];
	mach_msg_type_number_t scalar_outputCnt;

	__DeclareRcvRpc(2866, "io_connect_async_method")
	__BeforeRcvRpc(2866, "io_connect_async_method")

#if	defined(__MIG_check__Request__io_connect_async_method_t__defined)
	check_result = __MIG_check__Request__io_connect_async_method_t((__Request *)In0P, (__Request **)&In1P, (__Request **)&In2P, (__Request **)&In3P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_connect_async_method_t__defined) */

	OutP->inband_outputCnt = 4096;
	if (In3P->inband_outputCnt < OutP->inband_outputCnt)
		OutP->inband_outputCnt = In3P->inband_outputCnt;

	scalar_outputCnt = 16;
	if (In3P->scalar_outputCnt < scalar_outputCnt)
		scalar_outputCnt = In3P->scalar_outputCnt;

	OutP->RetCode = is_io_connect_async_method(In0P->Head.msgh_request_port, In0P->wake_port.name, In0P->reference, In0P->referenceCnt, In1P->selector, In1P->scalar_input, In1P->scalar_inputCnt, In2P->inband_input, In2P->inband_inputCnt, In3P->ool_input, In3P->ool_input_size, OutP->inband_output, &OutP->inband_outputCnt, scalar_output, &scalar_outputCnt, In3P->ool_output, &In3P->ool_output_size);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	msgh_size_delta = _WALIGN_((OutP->inband_outputCnt + 3) & ~3);
	msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4224) + msgh_size_delta;
	OutP = (Reply *) ((pointer_t) OutP + msgh_size_delta - 4096);
	(void)memcpy((char *) OutP->scalar_output, (const char *) scalar_output, 8 * scalar_outputCnt);
	OutP->scalar_outputCnt = scalar_outputCnt;
	msgh_size_delta = ((8 * scalar_outputCnt));
	msgh_size += msgh_size_delta;
	OutP = (Reply *) ((pointer_t) OutP + msgh_size_delta - 128);

	OutP->ool_output_size = In3P->ool_output_size;

	OutP = (Reply *) OutHeadP;
	OutP->Head.msgh_size = msgh_size;
	__AfterRcvRpc(2866, "io_connect_async_method")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_connect_set_notification_port_t__defined)
#define __MIG_check__Request__io_connect_set_notification_port_t__defined

mig_internal kern_return_t __MIG_check__Request__io_connect_set_notification_port_t(__attribute__((__unused__)) __Request__io_connect_set_notification_port_t *In0P)
{

	typedef __Request__io_connect_set_notification_port_t __Request;
#if	__MigTypeCheck
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->port.type != MACH_MSG_PORT_DESCRIPTOR ||
	    In0P->port.disposition != 17)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_connect_set_notification_port_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_connect_set_notification_port */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_connect_set_notification_port
(
	mach_port_t connection,
	uint32_t notification_type,
	mach_port_t port,
	io_user_reference_t reference
);

/* Routine io_connect_set_notification_port */
mig_internal novalue _Xio_connect_set_notification_port
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		uint32_t notification_type;
		io_user_reference_t reference;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_connect_set_notification_port_t __Request;
	typedef __Reply__io_connect_set_notification_port_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_connect_set_notification_port_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_connect_set_notification_port_t__defined */

	__DeclareRcvRpc(2867, "io_connect_set_notification_port")
	__BeforeRcvRpc(2867, "io_connect_set_notification_port")

#if	defined(__MIG_check__Request__io_connect_set_notification_port_t__defined)
	check_result = __MIG_check__Request__io_connect_set_notification_port_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_connect_set_notification_port_t__defined) */

	OutP->RetCode = is_io_connect_set_notification_port(In0P->Head.msgh_request_port, In0P->notification_type, In0P->port.name, In0P->reference);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2867, "io_connect_set_notification_port")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_add_notification_t__defined)
#define __MIG_check__Request__io_service_add_notification_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_add_notification_t(__attribute__((__unused__)) __Request__io_service_add_notification_t *In0P, __attribute__((__unused__)) __Request__io_service_add_notification_t **In1PP, __attribute__((__unused__)) __Request__io_service_add_notification_t **In2PP)
{

	typedef __Request__io_service_add_notification_t __Request;
	__Request *In1P;
	__Request *In2P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 704)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
	    In0P->wake_port.disposition != 17)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_t__notification_typeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_add_notification_t__notification_typeCnt(&In0P->notification_typeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_add_notification_t__notification_typeCnt__defined */
	msgh_size_delta = _WALIGN_(In0P->notification_typeCnt);
#if	__MigTypeCheck
	if ( In0P->notification_typeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 704)) < In0P->notification_typeCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 704) + _WALIGN_(In0P->notification_typeCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 128);

#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_t__matchingCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_add_notification_t__matchingCnt(&In1P->matchingCnt, In1P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_add_notification_t__matchingCnt__defined */
	msgh_size_delta = _WALIGN_(In1P->matchingCnt);
#if	__MigTypeCheck
	if ( In1P->matchingCnt > 512 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 704)) < In1P->matchingCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 704) + _WALIGN_(In1P->matchingCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In2PP = In2P = (__Request *) ((pointer_t) In1P + msgh_size_delta - 512);

#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_t__referenceCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_add_notification_t__referenceCnt(&In2P->referenceCnt, In2P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_add_notification_t__referenceCnt__defined */
#if	__MigTypeCheck
	if ( In2P->referenceCnt > 8 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 704)) / 8 < In2P->referenceCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 704) + (8 * In2P->referenceCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->notification_type),  128);
		if (( memchr(In0P->notification_type, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
		memchr_limit = min((msg_limit - In1P->matching),  512);
		if (( memchr(In1P->matching, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_add_notification_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_add_notification */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_add_notification
(
	mach_port_t master_port,
	io_name_t notification_type,
	io_string_t matching,
	mach_port_t wake_port,
	io_async_ref64_t reference,
	mach_msg_type_number_t referenceCnt,
	mach_port_t *notification
);

/* Routine io_service_add_notification */
mig_internal novalue _Xio_service_add_notification
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t wake_port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t notification_typeCnt;
		char notification_type[128];
		mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
		mach_msg_type_number_t matchingCnt;
		char matching[512];
		mach_msg_type_number_t referenceCnt;
		io_user_reference_t reference[8];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_add_notification_t __Request;
	typedef __Reply__io_service_add_notification_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Request *In2P;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_add_notification_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_add_notification_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t notificationTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2868, "io_service_add_notification")
	__BeforeRcvRpc(2868, "io_service_add_notification")

#if	defined(__MIG_check__Request__io_service_add_notification_t__defined)
	check_result = __MIG_check__Request__io_service_add_notification_t((__Request *)In0P, (__Request **)&In1P, (__Request **)&In2P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_add_notification_t__defined) */

#if	UseStaticTemplates
	OutP->notification = notificationTemplate;
#else	/* UseStaticTemplates */
	OutP->notification.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->notification.pad1 = 0;
#endif
	OutP->notification.pad2 = 0;
	OutP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->notification.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_service_add_notification(In0P->Head.msgh_request_port, In0P->notification_type, In1P->matching, In0P->wake_port.name, In2P->reference, In2P->referenceCnt, &OutP->notification.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2868, "io_service_add_notification")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_add_interest_notification_t__defined)
#define __MIG_check__Request__io_service_add_interest_notification_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_add_interest_notification_t(__attribute__((__unused__)) __Request__io_service_add_interest_notification_t *In0P, __attribute__((__unused__)) __Request__io_service_add_interest_notification_t **In1PP)
{

	typedef __Request__io_service_add_interest_notification_t __Request;
	__Request *In1P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 192)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
	    In0P->wake_port.disposition != 17)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_service_add_interest_notification_t__type_of_interestCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_add_interest_notification_t__type_of_interestCnt(&In0P->type_of_interestCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_add_interest_notification_t__type_of_interestCnt__defined */
	msgh_size_delta = _WALIGN_(In0P->type_of_interestCnt);
#if	__MigTypeCheck
	if ( In0P->type_of_interestCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 192)) < In0P->type_of_interestCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 192) + _WALIGN_(In0P->type_of_interestCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 128);

#if defined(__NDR_convert__int_rep__Request__io_service_add_interest_notification_t__referenceCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_add_interest_notification_t__referenceCnt(&In1P->referenceCnt, In1P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_add_interest_notification_t__referenceCnt__defined */
#if	__MigTypeCheck
	if ( In1P->referenceCnt > 8 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 192)) / 8 < In1P->referenceCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 192) + (8 * In1P->referenceCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->type_of_interest),  128);
		if (( memchr(In0P->type_of_interest, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_add_interest_notification_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_add_interest_notification */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_add_interest_notification
(
	mach_port_t service,
	io_name_t type_of_interest,
	mach_port_t wake_port,
	io_async_ref64_t reference,
	mach_msg_type_number_t referenceCnt,
	mach_port_t *notification
);

/* Routine io_service_add_interest_notification */
mig_internal novalue _Xio_service_add_interest_notification
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t wake_port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t type_of_interestOffset; /* MiG doesn't use it */
		mach_msg_type_number_t type_of_interestCnt;
		char type_of_interest[128];
		mach_msg_type_number_t referenceCnt;
		io_user_reference_t reference[8];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_add_interest_notification_t __Request;
	typedef __Reply__io_service_add_interest_notification_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_add_interest_notification_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_add_interest_notification_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t notificationTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2869, "io_service_add_interest_notification")
	__BeforeRcvRpc(2869, "io_service_add_interest_notification")

#if	defined(__MIG_check__Request__io_service_add_interest_notification_t__defined)
	check_result = __MIG_check__Request__io_service_add_interest_notification_t((__Request *)In0P, (__Request **)&In1P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_add_interest_notification_t__defined) */

#if	UseStaticTemplates
	OutP->notification = notificationTemplate;
#else	/* UseStaticTemplates */
	OutP->notification.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->notification.pad1 = 0;
#endif
	OutP->notification.pad2 = 0;
	OutP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->notification.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_service_add_interest_notification(In0P->Head.msgh_request_port, In0P->type_of_interest, In0P->wake_port.name, In1P->reference, In1P->referenceCnt, &OutP->notification.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2869, "io_service_add_interest_notification")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_add_notification_ool_t__defined)
#define __MIG_check__Request__io_service_add_notification_ool_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_add_notification_ool_t(__attribute__((__unused__)) __Request__io_service_add_notification_ool_t *In0P, __attribute__((__unused__)) __Request__io_service_add_notification_ool_t **In1PP)
{

	typedef __Request__io_service_add_notification_ool_t __Request;
	__Request *In1P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 2) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 192)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->matching.type != MACH_MSG_OOL_DESCRIPTOR)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
	    In0P->wake_port.disposition != 17)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_ool_t__notification_typeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_add_notification_ool_t__notification_typeCnt(&In0P->notification_typeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_add_notification_ool_t__notification_typeCnt__defined */
	msgh_size_delta = _WALIGN_(In0P->notification_typeCnt);
#if	__MigTypeCheck
	if ( In0P->notification_typeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 192)) < In0P->notification_typeCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 192) + _WALIGN_(In0P->notification_typeCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 128);

#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_ool_t__referenceCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_add_notification_ool_t__referenceCnt(&In1P->referenceCnt, In1P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_add_notification_ool_t__referenceCnt__defined */
#if	__MigTypeCheck
	if ( In1P->referenceCnt > 8 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 192)) / 8 < In1P->referenceCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 192) + (8 * In1P->referenceCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	if (In0P->matching.size != In1P->matchingCnt)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->notification_type),  128);
		if (( memchr(In0P->notification_type, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_add_notification_ool_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_add_notification_ool */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_add_notification_ool
(
	mach_port_t master_port,
	io_name_t notification_type,
	io_buf_ptr_t matching,
	mach_msg_type_number_t matchingCnt,
	mach_port_t wake_port,
	io_async_ref64_t reference,
	mach_msg_type_number_t referenceCnt,
	kern_return_t *result,
	mach_port_t *notification
);

/* Routine io_service_add_notification_ool */
mig_internal novalue _Xio_service_add_notification_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t matching;
		mach_msg_port_descriptor_t wake_port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t notification_typeCnt;
		char notification_type[128];
		mach_msg_type_number_t matchingCnt;
		mach_msg_type_number_t referenceCnt;
		io_user_reference_t reference[8];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_add_notification_ool_t __Request;
	typedef __Reply__io_service_add_notification_ool_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_add_notification_ool_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_add_notification_ool_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t notificationTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2870, "io_service_add_notification_ool")
	__BeforeRcvRpc(2870, "io_service_add_notification_ool")

#if	defined(__MIG_check__Request__io_service_add_notification_ool_t__defined)
	check_result = __MIG_check__Request__io_service_add_notification_ool_t((__Request *)In0P, (__Request **)&In1P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_add_notification_ool_t__defined) */

#if	UseStaticTemplates
	OutP->notification = notificationTemplate;
#else	/* UseStaticTemplates */
	OutP->notification.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->notification.pad1 = 0;
#endif
	OutP->notification.pad2 = 0;
	OutP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->notification.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_service_add_notification_ool(In0P->Head.msgh_request_port, In0P->notification_type, (io_buf_ptr_t)(In0P->matching.address), In0P->matching.size, In0P->wake_port.name, In1P->reference, In1P->referenceCnt, &OutP->result, &OutP->notification.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2870, "io_service_add_notification_ool")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined)
#define __MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_registry_entry_id_t(__attribute__((__unused__)) __Request__io_registry_entry_get_registry_entry_id_t *In0P)
{

	typedef __Request__io_registry_entry_get_registry_entry_id_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_registry_entry_id */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_registry_entry_id
(
	mach_port_t registry_entry,
	uint64_t *entry_id
);

/* Routine io_registry_entry_get_registry_entry_id */
mig_internal novalue _Xio_registry_entry_get_registry_entry_id
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_registry_entry_id_t __Request;
	typedef __Reply__io_registry_entry_get_registry_entry_id_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined */

	__DeclareRcvRpc(2871, "io_registry_entry_get_registry_entry_id")
	__BeforeRcvRpc(2871, "io_registry_entry_get_registry_entry_id")

#if	defined(__MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_registry_entry_id_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_registry_entry_id_t__defined) */

	OutP->RetCode = is_io_registry_entry_get_registry_entry_id(In0P->Head.msgh_request_port, &OutP->entry_id);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2871, "io_registry_entry_get_registry_entry_id")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_connect_method_var_output_t__defined)
#define __MIG_check__Request__io_connect_method_var_output_t__defined

mig_internal kern_return_t __MIG_check__Request__io_connect_method_var_output_t(__attribute__((__unused__)) __Request__io_connect_method_var_output_t *In0P, __attribute__((__unused__)) __Request__io_connect_method_var_output_t **In1PP, __attribute__((__unused__)) __Request__io_connect_method_var_output_t **In2PP)
{

	typedef __Request__io_connect_method_var_output_t __Request;
	__Request *In1P;
	__Request *In2P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4224)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_connect_method_var_output_t__scalar_inputCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_connect_method_var_output_t__scalar_inputCnt(&In0P->scalar_inputCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_connect_method_var_output_t__scalar_inputCnt__defined */
	msgh_size_delta = (8 * In0P->scalar_inputCnt);
#if	__MigTypeCheck
	if ( In0P->scalar_inputCnt > 16 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4224)) / 8 < In0P->scalar_inputCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4224) + (8 * In0P->scalar_inputCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 128);

#if defined(__NDR_convert__int_rep__Request__io_connect_method_var_output_t__inband_inputCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_connect_method_var_output_t__inband_inputCnt(&In1P->inband_inputCnt, In1P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_connect_method_var_output_t__inband_inputCnt__defined */
	msgh_size_delta = _WALIGN_(In1P->inband_inputCnt);
#if	__MigTypeCheck
	if ( In1P->inband_inputCnt > 4096 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4224)) < In1P->inband_inputCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4224) + _WALIGN_(In1P->inband_inputCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	*In2PP = In2P = (__Request *) ((pointer_t) In1P + msgh_size_delta - 4096);

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_connect_method_var_output_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_connect_method_var_output */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_connect_method_var_output
(
	mach_port_t connection,
	uint32_t selector,
	io_scalar_inband64_t scalar_input,
	mach_msg_type_number_t scalar_inputCnt,
	io_struct_inband_t inband_input,
	mach_msg_type_number_t inband_inputCnt,
	mach_vm_address_t ool_input,
	mach_vm_size_t ool_input_size,
	io_struct_inband_t inband_output,
	mach_msg_type_number_t *inband_outputCnt,
	io_scalar_inband64_t scalar_output,
	mach_msg_type_number_t *scalar_outputCnt,
	io_buf_ptr_t *var_output,
	mach_msg_type_number_t *var_outputCnt
);

/* Routine io_connect_method_var_output */
mig_internal novalue _Xio_connect_method_var_output
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint32_t selector;
		mach_msg_type_number_t scalar_inputCnt;
		io_user_scalar_t scalar_input[16];
		mach_msg_type_number_t inband_inputCnt;
		char inband_input[4096];
		mach_vm_address_t ool_input;
		mach_vm_size_t ool_input_size;
		mach_msg_type_number_t inband_outputCnt;
		mach_msg_type_number_t scalar_outputCnt;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_connect_method_var_output_t __Request;
	typedef __Reply__io_connect_method_var_output_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Request *In2P;
	Reply *OutP = (Reply *) OutHeadP;
	unsigned int msgh_size;
	unsigned int msgh_size_delta;

#ifdef	__MIG_check__Request__io_connect_method_var_output_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_connect_method_var_output_t__defined */

#if	UseStaticTemplates
	const static mach_msg_ool_descriptor_t var_outputTemplate = {
		/* addr = */		(void *)0,
		/* size = */		0,
		/* deal = */		FALSE,
		/* copy = */		MACH_MSG_PHYSICAL_COPY,
		/* pad2 = */		0,
		/* type = */		MACH_MSG_OOL_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	io_user_scalar_t scalar_output[16];
	mach_msg_type_number_t scalar_outputCnt;
	mach_msg_type_number_t var_outputCnt;

	__DeclareRcvRpc(2872, "io_connect_method_var_output")
	__BeforeRcvRpc(2872, "io_connect_method_var_output")

#if	defined(__MIG_check__Request__io_connect_method_var_output_t__defined)
	check_result = __MIG_check__Request__io_connect_method_var_output_t((__Request *)In0P, (__Request **)&In1P, (__Request **)&In2P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_connect_method_var_output_t__defined) */

#if	UseStaticTemplates
	OutP->var_output = var_outputTemplate;
#else	/* UseStaticTemplates */
	OutP->var_output.deallocate =  FALSE;
	OutP->var_output.copy = MACH_MSG_PHYSICAL_COPY;
	OutP->var_output.pad1 = 0;
	OutP->var_output.type = MACH_MSG_OOL_DESCRIPTOR;
#if defined(KERNEL) && !defined(__LP64__)
	OutP->var_output.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	OutP->inband_outputCnt = 4096;
	if (In2P->inband_outputCnt < OutP->inband_outputCnt)
		OutP->inband_outputCnt = In2P->inband_outputCnt;

	scalar_outputCnt = 16;
	if (In2P->scalar_outputCnt < scalar_outputCnt)
		scalar_outputCnt = In2P->scalar_outputCnt;

	RetCode = is_io_connect_method_var_output(In0P->Head.msgh_request_port, In0P->selector, In0P->scalar_input, In0P->scalar_inputCnt, In1P->inband_input, In1P->inband_inputCnt, In2P->ool_input, In2P->ool_input_size, OutP->inband_output, &OutP->inband_outputCnt, scalar_output, &scalar_outputCnt, (io_buf_ptr_t *)&(OutP->var_output.address), &var_outputCnt);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}
	OutP->var_output.size = var_outputCnt;

	OutP->NDR = NDR_record;

	msgh_size_delta = _WALIGN_((OutP->inband_outputCnt + 3) & ~3);
	msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4224) + msgh_size_delta;
	OutP = (Reply *) ((pointer_t) OutP + msgh_size_delta - 4096);
	(void)memcpy((char *) OutP->scalar_output, (const char *) scalar_output, 8 * scalar_outputCnt);
	OutP->scalar_outputCnt = scalar_outputCnt;
	msgh_size_delta = ((8 * scalar_outputCnt));
	msgh_size += msgh_size_delta;
	OutP = (Reply *) ((pointer_t) OutP + msgh_size_delta - 128);
	OutP->var_outputCnt = var_outputCnt;

	OutP = (Reply *) OutHeadP;
	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = msgh_size;
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2872, "io_connect_method_var_output")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_get_matching_service_t__defined)
#define __MIG_check__Request__io_service_get_matching_service_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_service_t(__attribute__((__unused__)) __Request__io_service_get_matching_service_t *In0P)
{

	typedef __Request__io_service_get_matching_service_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 512)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_service_get_matching_service_t__matchingCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_get_matching_service_t__matchingCnt(&In0P->matchingCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_get_matching_service_t__matchingCnt__defined */
#if	__MigTypeCheck
	if ( In0P->matchingCnt > 512 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 512)) < In0P->matchingCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 512) + _WALIGN_(In0P->matchingCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->matching),  512);
		if (( memchr(In0P->matching, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_get_matching_service_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_get_matching_service */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_get_matching_service
(
	mach_port_t master_port,
	io_string_t matching,
	mach_port_t *service
);

/* Routine io_service_get_matching_service */
mig_internal novalue _Xio_service_get_matching_service
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingOffset; /* MiG doesn't use it */
		mach_msg_type_number_t matchingCnt;
		char matching[512];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_get_matching_service_t __Request;
	typedef __Reply__io_service_get_matching_service_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_get_matching_service_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_get_matching_service_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t serviceTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2873, "io_service_get_matching_service")
	__BeforeRcvRpc(2873, "io_service_get_matching_service")

#if	defined(__MIG_check__Request__io_service_get_matching_service_t__defined)
	check_result = __MIG_check__Request__io_service_get_matching_service_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_get_matching_service_t__defined) */

#if	UseStaticTemplates
	OutP->service = serviceTemplate;
#else	/* UseStaticTemplates */
	OutP->service.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->service.pad1 = 0;
#endif
	OutP->service.pad2 = 0;
	OutP->service.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->service.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_service_get_matching_service(In0P->Head.msgh_request_port, In0P->matching, &OutP->service.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2873, "io_service_get_matching_service")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_get_matching_service_ool_t__defined)
#define __MIG_check__Request__io_service_get_matching_service_ool_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_service_ool_t(__attribute__((__unused__)) __Request__io_service_get_matching_service_ool_t *In0P)
{

	typedef __Request__io_service_get_matching_service_ool_t __Request;
#if	__MigTypeCheck
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->matching.type != MACH_MSG_OOL_DESCRIPTOR)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	if (In0P->matching.size != In0P->matchingCnt)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_get_matching_service_ool_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_get_matching_service_ool */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_get_matching_service_ool
(
	mach_port_t master_port,
	io_buf_ptr_t matching,
	mach_msg_type_number_t matchingCnt,
	kern_return_t *result,
	mach_port_t *service
);

/* Routine io_service_get_matching_service_ool */
mig_internal novalue _Xio_service_get_matching_service_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t matching;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_get_matching_service_ool_t __Request;
	typedef __Reply__io_service_get_matching_service_ool_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_get_matching_service_ool_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_get_matching_service_ool_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t serviceTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2874, "io_service_get_matching_service_ool")
	__BeforeRcvRpc(2874, "io_service_get_matching_service_ool")

#if	defined(__MIG_check__Request__io_service_get_matching_service_ool_t__defined)
	check_result = __MIG_check__Request__io_service_get_matching_service_ool_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_get_matching_service_ool_t__defined) */

#if	UseStaticTemplates
	OutP->service = serviceTemplate;
#else	/* UseStaticTemplates */
	OutP->service.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->service.pad1 = 0;
#endif
	OutP->service.pad2 = 0;
	OutP->service.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->service.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_service_get_matching_service_ool(In0P->Head.msgh_request_port, (io_buf_ptr_t)(In0P->matching.address), In0P->matching.size, &OutP->result, &OutP->service.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2874, "io_service_get_matching_service_ool")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_get_authorization_id_t__defined)
#define __MIG_check__Request__io_service_get_authorization_id_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_get_authorization_id_t(__attribute__((__unused__)) __Request__io_service_get_authorization_id_t *In0P)
{

	typedef __Request__io_service_get_authorization_id_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_get_authorization_id_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_get_authorization_id */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_get_authorization_id
(
	mach_port_t service,
	uint64_t *authorization_id
);

/* Routine io_service_get_authorization_id */
mig_internal novalue _Xio_service_get_authorization_id
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_get_authorization_id_t __Request;
	typedef __Reply__io_service_get_authorization_id_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_get_authorization_id_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_get_authorization_id_t__defined */

	__DeclareRcvRpc(2875, "io_service_get_authorization_id")
	__BeforeRcvRpc(2875, "io_service_get_authorization_id")

#if	defined(__MIG_check__Request__io_service_get_authorization_id_t__defined)
	check_result = __MIG_check__Request__io_service_get_authorization_id_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_get_authorization_id_t__defined) */

	OutP->RetCode = is_io_service_get_authorization_id(In0P->Head.msgh_request_port, &OutP->authorization_id);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2875, "io_service_get_authorization_id")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_set_authorization_id_t__defined)
#define __MIG_check__Request__io_service_set_authorization_id_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_set_authorization_id_t(__attribute__((__unused__)) __Request__io_service_set_authorization_id_t *In0P)
{

	typedef __Request__io_service_set_authorization_id_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_set_authorization_id_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_set_authorization_id */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_set_authorization_id
(
	mach_port_t service,
	uint64_t authorization_id
);

/* Routine io_service_set_authorization_id */
mig_internal novalue _Xio_service_set_authorization_id
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		uint64_t authorization_id;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_set_authorization_id_t __Request;
	typedef __Reply__io_service_set_authorization_id_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_set_authorization_id_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_set_authorization_id_t__defined */

	__DeclareRcvRpc(2876, "io_service_set_authorization_id")
	__BeforeRcvRpc(2876, "io_service_set_authorization_id")

#if	defined(__MIG_check__Request__io_service_set_authorization_id_t__defined)
	check_result = __MIG_check__Request__io_service_set_authorization_id_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_set_authorization_id_t__defined) */

	OutP->RetCode = is_io_service_set_authorization_id(In0P->Head.msgh_request_port, In0P->authorization_id);

	OutP->NDR = NDR_record;

	__AfterRcvRpc(2876, "io_service_set_authorization_id")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_server_version_t__defined)
#define __MIG_check__Request__io_server_version_t__defined

mig_internal kern_return_t __MIG_check__Request__io_server_version_t(__attribute__((__unused__)) __Request__io_server_version_t *In0P)
{

	typedef __Request__io_server_version_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_server_version_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_server_version */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_server_version
(
	mach_port_t master_port,
	uint64_t *version
);

/* Routine io_server_version */
mig_internal novalue _Xio_server_version
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_server_version_t __Request;
	typedef __Reply__io_server_version_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_server_version_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_server_version_t__defined */

	__DeclareRcvRpc(2877, "io_server_version")
	__BeforeRcvRpc(2877, "io_server_version")

#if	defined(__MIG_check__Request__io_server_version_t__defined)
	check_result = __MIG_check__Request__io_server_version_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_server_version_t__defined) */

	OutP->RetCode = is_io_server_version(In0P->Head.msgh_request_port, &OutP->version);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2877, "io_server_version")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_properties_bin_t__defined)
#define __MIG_check__Request__io_registry_entry_get_properties_bin_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_properties_bin_t(__attribute__((__unused__)) __Request__io_registry_entry_get_properties_bin_t *In0P)
{

	typedef __Request__io_registry_entry_get_properties_bin_t __Request;
#if	__MigTypeCheck
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_properties_bin_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_properties_bin */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_properties_bin
(
	mach_port_t registry_entry,
	io_buf_ptr_t *properties,
	mach_msg_type_number_t *propertiesCnt
);

/* Routine io_registry_entry_get_properties_bin */
mig_internal novalue _Xio_registry_entry_get_properties_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_properties_bin_t __Request;
	typedef __Reply__io_registry_entry_get_properties_bin_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_properties_bin_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_properties_bin_t__defined */

#if	UseStaticTemplates
	const static mach_msg_ool_descriptor_t propertiesTemplate = {
		/* addr = */		(void *)0,
		/* size = */		0,
		/* deal = */		FALSE,
		/* copy = */		MACH_MSG_PHYSICAL_COPY,
		/* pad2 = */		0,
		/* type = */		MACH_MSG_OOL_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2878, "io_registry_entry_get_properties_bin")
	__BeforeRcvRpc(2878, "io_registry_entry_get_properties_bin")

#if	defined(__MIG_check__Request__io_registry_entry_get_properties_bin_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_properties_bin_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_properties_bin_t__defined) */

#if	UseStaticTemplates
	OutP->properties = propertiesTemplate;
#else	/* UseStaticTemplates */
	OutP->properties.deallocate =  FALSE;
	OutP->properties.copy = MACH_MSG_PHYSICAL_COPY;
	OutP->properties.pad1 = 0;
	OutP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
#if defined(KERNEL) && !defined(__LP64__)
	OutP->properties.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_entry_get_properties_bin(In0P->Head.msgh_request_port, (io_buf_ptr_t *)&(OutP->properties.address), &OutP->propertiesCnt);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}
	OutP->properties.size = OutP->propertiesCnt;

	OutP->NDR = NDR_record;

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2878, "io_registry_entry_get_properties_bin")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_property_bin_t__defined)
#define __MIG_check__Request__io_registry_entry_get_property_bin_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_property_bin_t(__attribute__((__unused__)) __Request__io_registry_entry_get_property_bin_t *In0P, __attribute__((__unused__)) __Request__io_registry_entry_get_property_bin_t **In1PP, __attribute__((__unused__)) __Request__io_registry_entry_get_property_bin_t **In2PP)
{

	typedef __Request__io_registry_entry_get_property_bin_t __Request;
	__Request *In1P;
	__Request *In2P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 256)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__planeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__planeCnt(&In0P->planeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__planeCnt__defined */
	msgh_size_delta = _WALIGN_(In0P->planeCnt);
#if	__MigTypeCheck
	if ( In0P->planeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 256)) < In0P->planeCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 256) + _WALIGN_(In0P->planeCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 128);

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__property_nameCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__property_nameCnt(&In1P->property_nameCnt, In1P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_property_bin_t__property_nameCnt__defined */
	msgh_size_delta = _WALIGN_(In1P->property_nameCnt);
#if	__MigTypeCheck
	if ( In1P->property_nameCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 256)) < In1P->property_nameCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 256) + _WALIGN_(In1P->property_nameCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	*In2PP = In2P = (__Request *) ((pointer_t) In1P + msgh_size_delta - 128);

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->plane),  128);
		if (( memchr(In0P->plane, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
		memchr_limit = min((msg_limit - In1P->property_name),  128);
		if (( memchr(In1P->property_name, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_property_bin_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_property_bin */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_property_bin
(
	mach_port_t registry_entry,
	io_name_t plane,
	io_name_t property_name,
	uint32_t options,
	io_buf_ptr_t *properties,
	mach_msg_type_number_t *propertiesCnt
);

/* Routine io_registry_entry_get_property_bin */
mig_internal novalue _Xio_registry_entry_get_property_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		mach_msg_type_number_t property_nameOffset; /* MiG doesn't use it */
		mach_msg_type_number_t property_nameCnt;
		char property_name[128];
		uint32_t options;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_property_bin_t __Request;
	typedef __Reply__io_registry_entry_get_property_bin_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Request *In2P;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_get_property_bin_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_property_bin_t__defined */

#if	UseStaticTemplates
	const static mach_msg_ool_descriptor_t propertiesTemplate = {
		/* addr = */		(void *)0,
		/* size = */		0,
		/* deal = */		FALSE,
		/* copy = */		MACH_MSG_PHYSICAL_COPY,
		/* pad2 = */		0,
		/* type = */		MACH_MSG_OOL_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2879, "io_registry_entry_get_property_bin")
	__BeforeRcvRpc(2879, "io_registry_entry_get_property_bin")

#if	defined(__MIG_check__Request__io_registry_entry_get_property_bin_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_property_bin_t((__Request *)In0P, (__Request **)&In1P, (__Request **)&In2P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_property_bin_t__defined) */

#if	UseStaticTemplates
	OutP->properties = propertiesTemplate;
#else	/* UseStaticTemplates */
	OutP->properties.deallocate =  FALSE;
	OutP->properties.copy = MACH_MSG_PHYSICAL_COPY;
	OutP->properties.pad1 = 0;
	OutP->properties.type = MACH_MSG_OOL_DESCRIPTOR;
#if defined(KERNEL) && !defined(__LP64__)
	OutP->properties.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_entry_get_property_bin(In0P->Head.msgh_request_port, In0P->plane, In1P->property_name, In2P->options, (io_buf_ptr_t *)&(OutP->properties.address), &OutP->propertiesCnt);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}
	OutP->properties.size = OutP->propertiesCnt;

	OutP->NDR = NDR_record;

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2879, "io_registry_entry_get_property_bin")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_get_matching_service_bin_t__defined)
#define __MIG_check__Request__io_service_get_matching_service_bin_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_service_bin_t(__attribute__((__unused__)) __Request__io_service_get_matching_service_bin_t *In0P)
{

	typedef __Request__io_service_get_matching_service_bin_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4096)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_service_get_matching_service_bin_t__matchingCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_get_matching_service_bin_t__matchingCnt(&In0P->matchingCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_get_matching_service_bin_t__matchingCnt__defined */
#if	__MigTypeCheck
	if ( In0P->matchingCnt > 4096 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4096)) < In0P->matchingCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4096) + _WALIGN_(In0P->matchingCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_get_matching_service_bin_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_get_matching_service_bin */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_get_matching_service_bin
(
	mach_port_t master_port,
	io_struct_inband_t matching,
	mach_msg_type_number_t matchingCnt,
	mach_port_t *service
);

/* Routine io_service_get_matching_service_bin */
mig_internal novalue _Xio_service_get_matching_service_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
		char matching[4096];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_get_matching_service_bin_t __Request;
	typedef __Reply__io_service_get_matching_service_bin_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_get_matching_service_bin_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_get_matching_service_bin_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t serviceTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2880, "io_service_get_matching_service_bin")
	__BeforeRcvRpc(2880, "io_service_get_matching_service_bin")

#if	defined(__MIG_check__Request__io_service_get_matching_service_bin_t__defined)
	check_result = __MIG_check__Request__io_service_get_matching_service_bin_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_get_matching_service_bin_t__defined) */

#if	UseStaticTemplates
	OutP->service = serviceTemplate;
#else	/* UseStaticTemplates */
	OutP->service.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->service.pad1 = 0;
#endif
	OutP->service.pad2 = 0;
	OutP->service.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->service.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_service_get_matching_service_bin(In0P->Head.msgh_request_port, In0P->matching, In0P->matchingCnt, &OutP->service.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2880, "io_service_get_matching_service_bin")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_get_matching_services_bin_t__defined)
#define __MIG_check__Request__io_service_get_matching_services_bin_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_get_matching_services_bin_t(__attribute__((__unused__)) __Request__io_service_get_matching_services_bin_t *In0P)
{

	typedef __Request__io_service_get_matching_services_bin_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4096)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_service_get_matching_services_bin_t__matchingCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_get_matching_services_bin_t__matchingCnt(&In0P->matchingCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_get_matching_services_bin_t__matchingCnt__defined */
#if	__MigTypeCheck
	if ( In0P->matchingCnt > 4096 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4096)) < In0P->matchingCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4096) + _WALIGN_(In0P->matchingCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_get_matching_services_bin_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_get_matching_services_bin */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_get_matching_services_bin
(
	mach_port_t master_port,
	io_struct_inband_t matching,
	mach_msg_type_number_t matchingCnt,
	mach_port_t *existing
);

/* Routine io_service_get_matching_services_bin */
mig_internal novalue _Xio_service_get_matching_services_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
		char matching[4096];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_get_matching_services_bin_t __Request;
	typedef __Reply__io_service_get_matching_services_bin_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_get_matching_services_bin_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_get_matching_services_bin_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t existingTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2881, "io_service_get_matching_services_bin")
	__BeforeRcvRpc(2881, "io_service_get_matching_services_bin")

#if	defined(__MIG_check__Request__io_service_get_matching_services_bin_t__defined)
	check_result = __MIG_check__Request__io_service_get_matching_services_bin_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_get_matching_services_bin_t__defined) */

#if	UseStaticTemplates
	OutP->existing = existingTemplate;
#else	/* UseStaticTemplates */
	OutP->existing.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->existing.pad1 = 0;
#endif
	OutP->existing.pad2 = 0;
	OutP->existing.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->existing.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_service_get_matching_services_bin(In0P->Head.msgh_request_port, In0P->matching, In0P->matchingCnt, &OutP->existing.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2881, "io_service_get_matching_services_bin")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_match_property_table_bin_t__defined)
#define __MIG_check__Request__io_service_match_property_table_bin_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_match_property_table_bin_t(__attribute__((__unused__)) __Request__io_service_match_property_table_bin_t *In0P)
{

	typedef __Request__io_service_match_property_table_bin_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4096)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_service_match_property_table_bin_t__matchingCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_match_property_table_bin_t__matchingCnt(&In0P->matchingCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_match_property_table_bin_t__matchingCnt__defined */
#if	__MigTypeCheck
	if ( In0P->matchingCnt > 4096 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4096)) < In0P->matchingCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4096) + _WALIGN_(In0P->matchingCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_match_property_table_bin_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_match_property_table_bin */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_match_property_table_bin
(
	mach_port_t service,
	io_struct_inband_t matching,
	mach_msg_type_number_t matchingCnt,
	boolean_t *matches
);

/* Routine io_service_match_property_table_bin */
mig_internal novalue _Xio_service_match_property_table_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t matchingCnt;
		char matching[4096];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_match_property_table_bin_t __Request;
	typedef __Reply__io_service_match_property_table_bin_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_match_property_table_bin_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_match_property_table_bin_t__defined */

	__DeclareRcvRpc(2882, "io_service_match_property_table_bin")
	__BeforeRcvRpc(2882, "io_service_match_property_table_bin")

#if	defined(__MIG_check__Request__io_service_match_property_table_bin_t__defined)
	check_result = __MIG_check__Request__io_service_match_property_table_bin_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_match_property_table_bin_t__defined) */

	OutP->RetCode = is_io_service_match_property_table_bin(In0P->Head.msgh_request_port, In0P->matching, In0P->matchingCnt, &OutP->matches);
	if (OutP->RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, OutP->RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	__AfterRcvRpc(2882, "io_service_match_property_table_bin")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_service_add_notification_bin_t__defined)
#define __MIG_check__Request__io_service_add_notification_bin_t__defined

mig_internal kern_return_t __MIG_check__Request__io_service_add_notification_bin_t(__attribute__((__unused__)) __Request__io_service_add_notification_bin_t *In0P, __attribute__((__unused__)) __Request__io_service_add_notification_bin_t **In1PP, __attribute__((__unused__)) __Request__io_service_add_notification_bin_t **In2PP)
{

	typedef __Request__io_service_add_notification_bin_t __Request;
	__Request *In1P;
	__Request *In2P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->wake_port.type != MACH_MSG_PORT_DESCRIPTOR ||
	    In0P->wake_port.disposition != 17)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_bin_t__notification_typeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_add_notification_bin_t__notification_typeCnt(&In0P->notification_typeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_add_notification_bin_t__notification_typeCnt__defined */
	msgh_size_delta = _WALIGN_(In0P->notification_typeCnt);
#if	__MigTypeCheck
	if ( In0P->notification_typeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) < In0P->notification_typeCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288) + _WALIGN_(In0P->notification_typeCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 128);

#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_bin_t__matchingCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_add_notification_bin_t__matchingCnt(&In1P->matchingCnt, In1P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_add_notification_bin_t__matchingCnt__defined */
	msgh_size_delta = _WALIGN_(In1P->matchingCnt);
#if	__MigTypeCheck
	if ( In1P->matchingCnt > 4096 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) < In1P->matchingCnt) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4288) + _WALIGN_(In1P->matchingCnt)))
		return MIG_BAD_ARGUMENTS;
	msgh_size -= msgh_size_delta;
#endif	/* __MigTypeCheck */

	*In2PP = In2P = (__Request *) ((pointer_t) In1P + msgh_size_delta - 4096);

#if defined(__NDR_convert__int_rep__Request__io_service_add_notification_bin_t__referenceCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_service_add_notification_bin_t__referenceCnt(&In2P->referenceCnt, In2P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_service_add_notification_bin_t__referenceCnt__defined */
#if	__MigTypeCheck
	if ( In2P->referenceCnt > 8 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4288)) / 8 < In2P->referenceCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4288) + (8 * In2P->referenceCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->notification_type),  128);
		if (( memchr(In0P->notification_type, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_service_add_notification_bin_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_service_add_notification_bin */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_service_add_notification_bin
(
	mach_port_t master_port,
	io_name_t notification_type,
	io_struct_inband_t matching,
	mach_msg_type_number_t matchingCnt,
	mach_port_t wake_port,
	io_async_ref64_t reference,
	mach_msg_type_number_t referenceCnt,
	mach_port_t *notification
);

/* Routine io_service_add_notification_bin */
mig_internal novalue _Xio_service_add_notification_bin
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_port_descriptor_t wake_port;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t notification_typeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t notification_typeCnt;
		char notification_type[128];
		mach_msg_type_number_t matchingCnt;
		char matching[4096];
		mach_msg_type_number_t referenceCnt;
		io_user_reference_t reference[8];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_service_add_notification_bin_t __Request;
	typedef __Reply__io_service_add_notification_bin_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Request *In2P;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_service_add_notification_bin_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_service_add_notification_bin_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t notificationTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2884, "io_service_add_notification_bin")
	__BeforeRcvRpc(2884, "io_service_add_notification_bin")

#if	defined(__MIG_check__Request__io_service_add_notification_bin_t__defined)
	check_result = __MIG_check__Request__io_service_add_notification_bin_t((__Request *)In0P, (__Request **)&In1P, (__Request **)&In2P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_service_add_notification_bin_t__defined) */

#if	UseStaticTemplates
	OutP->notification = notificationTemplate;
#else	/* UseStaticTemplates */
	OutP->notification.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->notification.pad1 = 0;
#endif
	OutP->notification.pad2 = 0;
	OutP->notification.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->notification.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_service_add_notification_bin(In0P->Head.msgh_request_port, In0P->notification_type, In1P->matching, In1P->matchingCnt, In0P->wake_port.name, In2P->reference, In2P->referenceCnt, &OutP->notification.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2884, "io_service_add_notification_bin")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_get_path_ool_t__defined)
#define __MIG_check__Request__io_registry_entry_get_path_ool_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_get_path_ool_t(__attribute__((__unused__)) __Request__io_registry_entry_get_path_ool_t *In0P)
{

	typedef __Request__io_registry_entry_get_path_ool_t __Request;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 128)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_get_path_ool_t__planeCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_get_path_ool_t__planeCnt(&In0P->planeCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_get_path_ool_t__planeCnt__defined */
#if	__MigTypeCheck
	if ( In0P->planeCnt > 128 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 128)) < In0P->planeCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 128) + _WALIGN_(In0P->planeCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->plane),  128);
		if (( memchr(In0P->plane, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_get_path_ool_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_get_path_ool */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_get_path_ool
(
	mach_port_t registry_entry,
	io_name_t plane,
	io_string_inband_t path,
	io_buf_ptr_t *path_ool,
	mach_msg_type_number_t *path_oolCnt
);

/* Routine io_registry_entry_get_path_ool */
mig_internal novalue _Xio_registry_entry_get_path_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		NDR_record_t NDR;
		mach_msg_type_number_t planeOffset; /* MiG doesn't use it */
		mach_msg_type_number_t planeCnt;
		char plane[128];
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_get_path_ool_t __Request;
	typedef __Reply__io_registry_entry_get_path_ool_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Reply *OutP = (Reply *) OutHeadP;
	unsigned int msgh_size_delta;

#ifdef	__MIG_check__Request__io_registry_entry_get_path_ool_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_get_path_ool_t__defined */

#if	UseStaticTemplates
	const static mach_msg_ool_descriptor_t path_oolTemplate = {
		/* addr = */		(void *)0,
		/* size = */		0,
		/* deal = */		FALSE,
		/* copy = */		MACH_MSG_PHYSICAL_COPY,
		/* pad2 = */		0,
		/* type = */		MACH_MSG_OOL_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	mach_msg_type_number_t path_oolCnt;

	__DeclareRcvRpc(2885, "io_registry_entry_get_path_ool")
	__BeforeRcvRpc(2885, "io_registry_entry_get_path_ool")

#if	defined(__MIG_check__Request__io_registry_entry_get_path_ool_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_get_path_ool_t((__Request *)In0P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_get_path_ool_t__defined) */

#if	UseStaticTemplates
	OutP->path_ool = path_oolTemplate;
#else	/* UseStaticTemplates */
	OutP->path_ool.deallocate =  FALSE;
	OutP->path_ool.copy = MACH_MSG_PHYSICAL_COPY;
	OutP->path_ool.pad1 = 0;
	OutP->path_ool.type = MACH_MSG_OOL_DESCRIPTOR;
#if defined(KERNEL) && !defined(__LP64__)
	OutP->path_ool.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_entry_get_path_ool(In0P->Head.msgh_request_port, In0P->plane, OutP->path, (io_buf_ptr_t *)&(OutP->path_ool.address), &path_oolCnt);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}
	OutP->path_ool.size = path_oolCnt;

	OutP->NDR = NDR_record;

#ifdef __LP64__
	{
		size_t strLength = strlen(OutP->path) + 1;
		if (strLength > 0xffffffff)
			MIG_RETURN_ERROR(OutP, MIG_BAD_ARGUMENTS);
		OutP->pathCnt = (mach_msg_type_number_t) strLength;
	}
#else
	OutP->pathCnt = (mach_msg_type_number_t) strlen(OutP->path) + 1;
#endif /* __LP64__ */
	msgh_size_delta = _WALIGN_((OutP->pathCnt + 3) & ~3);
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 4096) + msgh_size_delta;
	OutP = (Reply *) ((pointer_t) OutP + msgh_size_delta - 4096);
	OutP->path_oolCnt = path_oolCnt;

	OutP = (Reply *) OutHeadP;
	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2885, "io_registry_entry_get_path_ool")
}

#if ( __MigTypeCheck )
#if __MIG_check__Request__iokit_subsystem__
#if !defined(__MIG_check__Request__io_registry_entry_from_path_ool_t__defined)
#define __MIG_check__Request__io_registry_entry_from_path_ool_t__defined

mig_internal kern_return_t __MIG_check__Request__io_registry_entry_from_path_ool_t(__attribute__((__unused__)) __Request__io_registry_entry_from_path_ool_t *In0P, __attribute__((__unused__)) __Request__io_registry_entry_from_path_ool_t **In1PP)
{

	typedef __Request__io_registry_entry_from_path_ool_t __Request;
	__Request *In1P;
#if	__MigTypeCheck
	unsigned int msgh_size;
#endif	/* __MigTypeCheck */
	unsigned int msgh_size_delta;

#if	__MigTypeCheck
	msgh_size = In0P->Head.msgh_size;
	if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
	    (In0P->msgh_body.msgh_descriptor_count != 1) ||
	    (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 4096)) ||  (msgh_size > (mach_msg_size_t)sizeof(__Request)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

#if	__MigTypeCheck
	if (In0P->path_ool.type != MACH_MSG_OOL_DESCRIPTOR)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if defined(__NDR_convert__int_rep__Request__io_registry_entry_from_path_ool_t__pathCnt__defined)
	if (In0P->NDR.int_rep != NDR_record.int_rep)
		__NDR_convert__int_rep__Request__io_registry_entry_from_path_ool_t__pathCnt(&In0P->pathCnt, In0P->NDR.int_rep);
#endif	/* __NDR_convert__int_rep__Request__io_registry_entry_from_path_ool_t__pathCnt__defined */
	msgh_size_delta = _WALIGN_(In0P->pathCnt);
#if	__MigTypeCheck
	if ( In0P->pathCnt > 4096 )
		return MIG_BAD_ARGUMENTS;
	if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 4096)) < In0P->pathCnt) ||
	    (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 4096) + _WALIGN_(In0P->pathCnt)))
		return MIG_BAD_ARGUMENTS;
#endif	/* __MigTypeCheck */

	*In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 4096);

#if __MigTypeCheck
	if (In0P->path_ool.size != In1P->path_oolCnt)
		return MIG_TYPE_ERROR;
#endif	/* __MigTypeCheck */

#if __MigTypeCheck
	{
		char * msg_limit = ((char *) In0P) + In0P->Head.msgh_size;
		size_t memchr_limit;

		memchr_limit = min((msg_limit - In0P->path),  4096);
		if (( memchr(In0P->path, '\0', memchr_limit) == NULL ))
			return MIG_BAD_ARGUMENTS; // string length exceeds buffer length!
	}
#endif	/* __MigTypeCheck */

	return MACH_MSG_SUCCESS;
}
#endif /* !defined(__MIG_check__Request__io_registry_entry_from_path_ool_t__defined) */
#endif /* __MIG_check__Request__iokit_subsystem__ */
#endif /* ( __MigTypeCheck ) */

/* Routine io_registry_entry_from_path_ool */
#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
kern_return_t is_io_registry_entry_from_path_ool
(
	mach_port_t master_port,
	io_string_inband_t path,
	io_buf_ptr_t path_ool,
	mach_msg_type_number_t path_oolCnt,
	kern_return_t *result,
	mach_port_t *registry_entry
);

/* Routine io_registry_entry_from_path_ool */
mig_internal novalue _Xio_registry_entry_from_path_ool
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{

#ifdef  __MigPackStructs
#pragma pack(4)
#endif
	typedef struct {
		mach_msg_header_t Head;
		/* start of the kernel processed data */
		mach_msg_body_t msgh_body;
		mach_msg_ool_descriptor_t path_ool;
		/* end of the kernel processed data */
		NDR_record_t NDR;
		mach_msg_type_number_t pathOffset; /* MiG doesn't use it */
		mach_msg_type_number_t pathCnt;
		char path[4096];
		mach_msg_type_number_t path_oolCnt;
		mach_msg_trailer_t trailer;
	} Request __attribute__((unused));
#ifdef  __MigPackStructs
#pragma pack()
#endif
	typedef __Request__io_registry_entry_from_path_ool_t __Request;
	typedef __Reply__io_registry_entry_from_path_ool_t Reply __attribute__((unused));

	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	Request *In0P = (Request *) InHeadP;
	Request *In1P;
	Reply *OutP = (Reply *) OutHeadP;
#ifdef	__MIG_check__Request__io_registry_entry_from_path_ool_t__defined
	kern_return_t check_result;
#endif	/* __MIG_check__Request__io_registry_entry_from_path_ool_t__defined */

#if	UseStaticTemplates
	const static mach_msg_port_descriptor_t registry_entryTemplate = {
		/* name = */		MACH_PORT_NULL,
		/* pad1 = */		0,
		/* pad2 = */		0,
		/* disp = */		19,
		/* type = */		MACH_MSG_PORT_DESCRIPTOR,
	};
#endif	/* UseStaticTemplates */

	kern_return_t RetCode;
	__DeclareRcvRpc(2886, "io_registry_entry_from_path_ool")
	__BeforeRcvRpc(2886, "io_registry_entry_from_path_ool")

#if	defined(__MIG_check__Request__io_registry_entry_from_path_ool_t__defined)
	check_result = __MIG_check__Request__io_registry_entry_from_path_ool_t((__Request *)In0P, (__Request **)&In1P);
	if (check_result != MACH_MSG_SUCCESS)
		{ MIG_RETURN_ERROR(OutP, check_result); }
#endif	/* defined(__MIG_check__Request__io_registry_entry_from_path_ool_t__defined) */

#if	UseStaticTemplates
	OutP->registry_entry = registry_entryTemplate;
#else	/* UseStaticTemplates */
	OutP->registry_entry.disposition = 19;
#if !(defined(KERNEL) && defined(__LP64__))
	OutP->registry_entry.pad1 = 0;
#endif
	OutP->registry_entry.pad2 = 0;
	OutP->registry_entry.type = MACH_MSG_PORT_DESCRIPTOR;
#if defined(KERNEL)
	OutP->registry_entry.pad_end = 0;
#endif
#endif	/* UseStaticTemplates */

	RetCode = is_io_registry_entry_from_path_ool(In0P->Head.msgh_request_port, In0P->path, (io_buf_ptr_t)(In0P->path_ool.address), In0P->path_ool.size, &OutP->result, &OutP->registry_entry.name);
	if (RetCode != KERN_SUCCESS) {
		MIG_RETURN_ERROR(OutP, RetCode);
	}

	OutP->NDR = NDR_record;

	OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX;
	OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply));
	OutP->msgh_body.msgh_descriptor_count = 1;
	__AfterRcvRpc(2886, "io_registry_entry_from_path_ool")
}

#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
boolean_t iokit_server(
		mach_msg_header_t *InHeadP,
		mach_msg_header_t *OutHeadP);

#ifdef	mig_external
mig_external
#else
extern
#endif	/* mig_external */
mig_routine_t iokit_server_routine(
		mach_msg_header_t *InHeadP);

/* Description of this subsystem, for use in direct RPC */
const struct is_iokit_subsystem {
	mig_server_routine_t 	server;	/* Server routine */
	mach_msg_id_t	start;	/* Min routine number */
	mach_msg_id_t	end;	/* Max routine number + 1 */
	unsigned int	maxsize;	/* Max msg size */
	vm_address_t	reserved;	/* Reserved */
	struct routine_descriptor	/*Array of routine descriptors */
		routine[87];
} is_iokit_subsystem = {
	iokit_server_routine,
	2800,
	2887,
	(mach_msg_size_t)sizeof(union __ReplyUnion__is_iokit_subsystem),
	(vm_address_t)0,
	{
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_object_get_class, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_object_get_class_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_object_conforms_to, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_object_conforms_to_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_iterator_next, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_iterator_next_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_iterator_reset, 1, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_iterator_reset_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_get_matching_services, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_services_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_property, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_property_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_create_iterator, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_create_iterator_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_iterator_enter_entry, 1, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_iterator_enter_entry_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_iterator_exit_entry, 1, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_iterator_exit_entry_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_from_path, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_from_path_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_name, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_name_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_properties, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_properties_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_property_bytes, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_property_bytes_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_child_iterator, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_child_iterator_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_parent_iterator, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_parent_iterator_t)},
		{0, 0, 0, 0, 0, 0},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_close, 1, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_close_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_connect_get_service, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_connect_get_service_t)},
		{0, 0, 0, 0, 0, 0},
		{0, 0, 0, 0, 0, 0},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_connect_add_client, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_connect_add_client_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_connect_set_properties, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_connect_set_properties_t)},
		{0, 0, 0, 0, 0, 0},
		{0, 0, 0, 0, 0, 0},
		{0, 0, 0, 0, 0, 0},
		{0, 0, 0, 0, 0, 0},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_path, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_path_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_get_root_entry, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_get_root_entry_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_set_properties, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_set_properties_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_in_plane, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_in_plane_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_object_get_retain_count, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_object_get_retain_count_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_get_busy_state, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_get_busy_state_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_wait_quiet, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_wait_quiet_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_create_iterator, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_create_iterator_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_iterator_is_valid, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_iterator_is_valid_t)},
		{0, 0, 0, 0, 0, 0},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_catalog_send_data, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_catalog_send_data_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_catalog_terminate, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_catalog_terminate_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_catalog_get_data, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_catalog_get_data_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_catalog_get_gen_count, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_catalog_get_gen_count_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_catalog_module_loaded, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_catalog_module_loaded_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_catalog_reset, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_catalog_reset_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_request_probe, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_request_probe_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_name_in_plane, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_name_in_plane_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_match_property_table, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_match_property_table_t)},
		{0, 0, 0, 0, 0, 0},
		{0, 0, 0, 0, 0, 0},
		{0, 0, 0, 0, 0, 0},
		{0, 0, 0, 0, 0, 0},
		{0, 0, 0, 0, 0, 0},
		{0, 0, 0, 0, 0, 0},
		{0, 0, 0, 0, 0, 0},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_connect_get_notification_semaphore, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_connect_get_notification_semaphore_t)},
		{0, 0, 0, 0, 0, 0},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_location_in_plane, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_location_in_plane_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_property_recursively, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_property_recursively_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_get_state, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_get_state_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_get_matching_services_ool, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_services_ool_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_match_property_table_ool, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_match_property_table_ool_t)},
		{0, 0, 0, 0, 0, 0},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_object_get_superclass, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_object_get_superclass_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_object_get_bundle_identifier, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_object_get_bundle_identifier_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_open_extended, 8, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_open_extended_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_connect_map_memory_into_task, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_connect_map_memory_into_task_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_connect_unmap_memory_from_task, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_connect_unmap_memory_from_task_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_connect_method, 17, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_connect_method_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_connect_async_method, 20, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_connect_async_method_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_connect_set_notification_port, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_connect_set_notification_port_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_add_notification, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_add_notification_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_add_interest_notification, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_add_interest_notification_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_add_notification_ool, 9, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_add_notification_ool_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_registry_entry_id, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_registry_entry_id_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_connect_method_var_output, 16, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_connect_method_var_output_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_get_matching_service, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_service_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_get_matching_service_ool, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_service_ool_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_get_authorization_id, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_get_authorization_id_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_set_authorization_id, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_set_authorization_id_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_server_version, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_server_version_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_properties_bin, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_properties_bin_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_property_bin, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_property_bin_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_get_matching_service_bin, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_service_bin_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_get_matching_services_bin, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_get_matching_services_bin_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_match_property_table_bin, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_match_property_table_bin_t)},
		{0, 0, 0, 0, 0, 0},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_service_add_notification_bin, 8, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_service_add_notification_bin_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_get_path_ool, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_get_path_ool_t)},
          { (mig_impl_routine_t) 0,
          (mig_stub_routine_t) _Xio_registry_entry_from_path_ool, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__io_registry_entry_from_path_ool_t)},
	}
};

mig_external boolean_t iokit_server
	(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP)
{
	/*
	 * typedef struct {
	 * 	mach_msg_header_t Head;
	 * 	NDR_record_t NDR;
	 * 	kern_return_t RetCode;
	 * } mig_reply_error_t;
	 */

	register mig_routine_t routine;

	OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0);
	OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port;
	/* Minimal size: routine() will update it if different */
	OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t);
	OutHeadP->msgh_local_port = MACH_PORT_NULL;
	OutHeadP->msgh_id = InHeadP->msgh_id + 100;
	OutHeadP->msgh_reserved = 0;

	if ((InHeadP->msgh_id > 2886) || (InHeadP->msgh_id < 2800) ||
	    ((routine = is_iokit_subsystem.routine[InHeadP->msgh_id - 2800].stub_routine) == 0)) {
		((mig_reply_error_t *)OutHeadP)->NDR = NDR_record;
		((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID;
		return FALSE;
	}
	(*routine) (InHeadP, OutHeadP);
	return TRUE;
}

mig_external mig_routine_t iokit_server_routine
	(mach_msg_header_t *InHeadP)
{
	register int msgh_id;

	msgh_id = InHeadP->msgh_id - 2800;

	if ((msgh_id > 86) || (msgh_id < 0))
		return 0;

	return is_iokit_subsystem.routine[msgh_id].stub_routine;
}