• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* automatically generated by rust-bindgen 0.69.2
2 
3 See instructions from: https://rust-lang.github.io/rust-bindgen/print.html
4   Download LLVM from: https://releases.llvm.org/download.html
5   ADD LIBCLANG_PATH to environment
6 
7   bindgen.exe `
8    .\include\hax_interface.h `
9    -o platform\crosvm\hypervisor\src\haxm\haxm_sys\bindings.rs `
10    --with-derive-default `
11    -- -DHAX_TESTS=1
12 
13   The HAX_TESTS macro definition prevents the inlude file from including
14   anything that's only needed by the kernel.
15 
16   I also had to remove some align tags for structs that live within packed
17   structs, there's a bindgen bug for this:
18   https://github.com/rust-lang/rust-bindgen/issues/1538
19 
20   I removed the align from:
21     - interruptibility_state_t__bindgen_ty_1
22     - segment_desc_t__bindgen_ty_1__bindgen_ty_1
23 */
24 #![allow(clippy::undocumented_unsafe_blocks)]
25 
26 #[repr(C)]
27 #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
28 pub struct __BindgenBitfieldUnit<Storage> {
29     storage: Storage,
30 }
31 impl<Storage> __BindgenBitfieldUnit<Storage> {
32     #[inline]
new(storage: Storage) -> Self33     pub const fn new(storage: Storage) -> Self {
34         Self { storage }
35     }
36 }
37 impl<Storage> __BindgenBitfieldUnit<Storage>
38 where
39     Storage: AsRef<[u8]> + AsMut<[u8]>,
40 {
41     #[inline]
get_bit(&self, index: usize) -> bool42     pub fn get_bit(&self, index: usize) -> bool {
43         debug_assert!(index / 8 < self.storage.as_ref().len());
44         let byte_index = index / 8;
45         let byte = self.storage.as_ref()[byte_index];
46         let bit_index = if cfg!(target_endian = "big") {
47             7 - (index % 8)
48         } else {
49             index % 8
50         };
51         let mask = 1 << bit_index;
52         byte & mask == mask
53     }
54     #[inline]
set_bit(&mut self, index: usize, val: bool)55     pub fn set_bit(&mut self, index: usize, val: bool) {
56         debug_assert!(index / 8 < self.storage.as_ref().len());
57         let byte_index = index / 8;
58         let byte = &mut self.storage.as_mut()[byte_index];
59         let bit_index = if cfg!(target_endian = "big") {
60             7 - (index % 8)
61         } else {
62             index % 8
63         };
64         let mask = 1 << bit_index;
65         if val {
66             *byte |= mask;
67         } else {
68             *byte &= !mask;
69         }
70     }
71     #[inline]
get(&self, bit_offset: usize, bit_width: u8) -> u6472     pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
73         debug_assert!(bit_width <= 64);
74         debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
75         debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
76         let mut val = 0;
77         for i in 0..(bit_width as usize) {
78             if self.get_bit(i + bit_offset) {
79                 let index = if cfg!(target_endian = "big") {
80                     bit_width as usize - 1 - i
81                 } else {
82                     i
83                 };
84                 val |= 1 << index;
85             }
86         }
87         val
88     }
89     #[inline]
set(&mut self, bit_offset: usize, bit_width: u8, val: u64)90     pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
91         debug_assert!(bit_width <= 64);
92         debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
93         debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
94         for i in 0..(bit_width as usize) {
95             let mask = 1 << i;
96             let val_bit_is_set = val & mask == mask;
97             let index = if cfg!(target_endian = "big") {
98                 bit_width as usize - 1 - i
99             } else {
100                 i
101             };
102             self.set_bit(index + bit_offset, val_bit_is_set);
103         }
104     }
105 }
106 #[repr(C)]
107 #[derive(Default)]
108 pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
109 impl<T> __IncompleteArrayField<T> {
110     #[inline]
new() -> Self111     pub const fn new() -> Self {
112         __IncompleteArrayField(::std::marker::PhantomData, [])
113     }
114     #[inline]
as_ptr(&self) -> *const T115     pub fn as_ptr(&self) -> *const T {
116         self as *const _ as *const T
117     }
118     #[inline]
as_mut_ptr(&mut self) -> *mut T119     pub fn as_mut_ptr(&mut self) -> *mut T {
120         self as *mut _ as *mut T
121     }
122     #[inline]
as_slice(&self, len: usize) -> &[T]123     pub unsafe fn as_slice(&self, len: usize) -> &[T] {
124         ::std::slice::from_raw_parts(self.as_ptr(), len)
125     }
126     #[inline]
as_mut_slice(&mut self, len: usize) -> &mut [T]127     pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
128         ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
129     }
130 }
131 impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result132     fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
133         fmt.write_str("__IncompleteArrayField")
134     }
135 }
136 pub const _VCRT_COMPILER_PREPROCESSOR: u32 = 1;
137 pub const _SAL_VERSION: u32 = 20;
138 pub const __SAL_H_VERSION: u32 = 180000000;
139 pub const _USE_DECLSPECS_FOR_SAL: u32 = 0;
140 pub const _USE_ATTRIBUTES_FOR_SAL: u32 = 0;
141 pub const _CRT_PACKING: u32 = 8;
142 pub const _HAS_EXCEPTIONS: u32 = 1;
143 pub const _STL_LANG: u32 = 0;
144 pub const _HAS_CXX17: u32 = 0;
145 pub const _HAS_CXX20: u32 = 0;
146 pub const _HAS_CXX23: u32 = 0;
147 pub const _HAS_NODISCARD: u32 = 0;
148 pub const WCHAR_MIN: u32 = 0;
149 pub const WCHAR_MAX: u32 = 65535;
150 pub const WINT_MIN: u32 = 0;
151 pub const WINT_MAX: u32 = 65535;
152 pub const HAX_PAGE_SIZE: u32 = 4096;
153 pub const HAX_PAGE_SHIFT: u32 = 12;
154 pub const HAX_PAGE_MASK: u32 = 4095;
155 pub const HAX_MAX_MSR_ARRAY: u32 = 32;
156 pub const HAX_IO_OUT: u32 = 0;
157 pub const HAX_IO_IN: u32 = 1;
158 pub const HAX_PAGEFAULT_ACC_R: u32 = 1;
159 pub const HAX_PAGEFAULT_ACC_W: u32 = 2;
160 pub const HAX_PAGEFAULT_ACC_X: u32 = 4;
161 pub const HAX_PAGEFAULT_PERM_R: u32 = 16;
162 pub const HAX_PAGEFAULT_PERM_W: u32 = 32;
163 pub const HAX_PAGEFAULT_PERM_X: u32 = 64;
164 pub const HAX_CAP_STATUS_WORKING: u32 = 1;
165 pub const HAX_CAP_MEMQUOTA: u32 = 2;
166 pub const HAX_CAP_WORKSTATUS_MASK: u32 = 1;
167 pub const HAX_CAP_FAILREASON_VT: u32 = 1;
168 pub const HAX_CAP_FAILREASON_NX: u32 = 2;
169 pub const HAX_CAP_EPT: u32 = 1;
170 pub const HAX_CAP_FASTMMIO: u32 = 2;
171 pub const HAX_CAP_UG: u32 = 4;
172 pub const HAX_CAP_64BIT_RAMBLOCK: u32 = 8;
173 pub const HAX_CAP_64BIT_SETRAM: u32 = 16;
174 pub const HAX_CAP_TUNNEL_PAGE: u32 = 32;
175 pub const HAX_CAP_RAM_PROTECTION: u32 = 64;
176 pub const HAX_CAP_DEBUG: u32 = 128;
177 pub const HAX_CAP_IMPLICIT_RAMBLOCK: u32 = 256;
178 pub const HAX_CAP_CPUID: u32 = 512;
179 pub const HAX_CAP_VM_LOG: u32 = 1024;
180 pub const HAX_RAM_INFO_ROM: u32 = 1;
181 pub const HAX_RAM_INFO_STANDALONE: u32 = 64;
182 pub const HAX_RAM_INFO_INVALID: u32 = 128;
183 pub const HAX_RAM_PERM_NONE: u32 = 0;
184 pub const HAX_RAM_PERM_RWX: u32 = 7;
185 pub const HAX_RAM_PERM_MASK: u32 = 7;
186 pub const HAX_DEBUG_ENABLE: u32 = 1;
187 pub const HAX_DEBUG_STEP: u32 = 2;
188 pub const HAX_DEBUG_USE_SW_BP: u32 = 4;
189 pub const HAX_DEBUG_USE_HW_BP: u32 = 8;
190 pub const HAX_MAX_CPUID_ENTRIES: u32 = 64;
191 pub type va_list = *mut ::std::os::raw::c_char;
192 extern "C" {
__va_start(arg1: *mut *mut ::std::os::raw::c_char, ...)193     pub fn __va_start(arg1: *mut *mut ::std::os::raw::c_char, ...);
194 }
195 pub type __vcrt_bool = bool;
196 pub type wchar_t = ::std::os::raw::c_ushort;
197 extern "C" {
__security_init_cookie()198     pub fn __security_init_cookie();
199 }
200 extern "C" {
__security_check_cookie(_StackCookie: usize)201     pub fn __security_check_cookie(_StackCookie: usize);
202 }
203 extern "C" {
__report_gsfailure(_StackCookie: usize) -> !204     pub fn __report_gsfailure(_StackCookie: usize) -> !;
205 }
206 extern "C" {
207     pub static mut __security_cookie: usize;
208 }
209 pub type int_least8_t = ::std::os::raw::c_schar;
210 pub type int_least16_t = ::std::os::raw::c_short;
211 pub type int_least32_t = ::std::os::raw::c_int;
212 pub type int_least64_t = ::std::os::raw::c_longlong;
213 pub type uint_least8_t = ::std::os::raw::c_uchar;
214 pub type uint_least16_t = ::std::os::raw::c_ushort;
215 pub type uint_least32_t = ::std::os::raw::c_uint;
216 pub type uint_least64_t = ::std::os::raw::c_ulonglong;
217 pub type int_fast8_t = ::std::os::raw::c_schar;
218 pub type int_fast16_t = ::std::os::raw::c_int;
219 pub type int_fast32_t = ::std::os::raw::c_int;
220 pub type int_fast64_t = ::std::os::raw::c_longlong;
221 pub type uint_fast8_t = ::std::os::raw::c_uchar;
222 pub type uint_fast16_t = ::std::os::raw::c_uint;
223 pub type uint_fast32_t = ::std::os::raw::c_uint;
224 pub type uint_fast64_t = ::std::os::raw::c_ulonglong;
225 pub type intmax_t = ::std::os::raw::c_longlong;
226 pub type uintmax_t = ::std::os::raw::c_ulonglong;
227 pub type hax_pa_t = u64;
228 pub type hax_pfn_t = u64;
229 pub type hax_paddr_t = u64;
230 pub type hax_vaddr_t = u64;
231 #[repr(C, packed)]
232 #[derive(Copy, Clone)]
233 pub union interruptibility_state_t {
234     pub raw: u32,
235     pub __bindgen_anon_1: interruptibility_state_t__bindgen_ty_1,
236     pub pad: u64,
237 }
238 #[repr(C)]
239 #[derive(Debug, Default, Copy, Clone)]
240 pub struct interruptibility_state_t__bindgen_ty_1 {
241     pub _bitfield_align_1: [u32; 0],
242     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
243 }
244 #[test]
bindgen_test_layout_interruptibility_state_t__bindgen_ty_1()245 fn bindgen_test_layout_interruptibility_state_t__bindgen_ty_1() {
246     assert_eq!(
247         ::std::mem::size_of::<interruptibility_state_t__bindgen_ty_1>(),
248         4usize,
249         concat!(
250             "Size of: ",
251             stringify!(interruptibility_state_t__bindgen_ty_1)
252         )
253     );
254 }
255 impl interruptibility_state_t__bindgen_ty_1 {
256     #[inline]
sti_blocking(&self) -> u32257     pub fn sti_blocking(&self) -> u32 {
258         unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
259     }
260     #[inline]
set_sti_blocking(&mut self, val: u32)261     pub fn set_sti_blocking(&mut self, val: u32) {
262         unsafe {
263             let val: u32 = ::std::mem::transmute(val);
264             self._bitfield_1.set(0usize, 1u8, val as u64)
265         }
266     }
267     #[inline]
movss_blocking(&self) -> u32268     pub fn movss_blocking(&self) -> u32 {
269         unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
270     }
271     #[inline]
set_movss_blocking(&mut self, val: u32)272     pub fn set_movss_blocking(&mut self, val: u32) {
273         unsafe {
274             let val: u32 = ::std::mem::transmute(val);
275             self._bitfield_1.set(1usize, 1u8, val as u64)
276         }
277     }
278     #[inline]
smi_blocking(&self) -> u32279     pub fn smi_blocking(&self) -> u32 {
280         unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
281     }
282     #[inline]
set_smi_blocking(&mut self, val: u32)283     pub fn set_smi_blocking(&mut self, val: u32) {
284         unsafe {
285             let val: u32 = ::std::mem::transmute(val);
286             self._bitfield_1.set(2usize, 1u8, val as u64)
287         }
288     }
289     #[inline]
nmi_blocking(&self) -> u32290     pub fn nmi_blocking(&self) -> u32 {
291         unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
292     }
293     #[inline]
set_nmi_blocking(&mut self, val: u32)294     pub fn set_nmi_blocking(&mut self, val: u32) {
295         unsafe {
296             let val: u32 = ::std::mem::transmute(val);
297             self._bitfield_1.set(3usize, 1u8, val as u64)
298         }
299     }
300     #[inline]
reserved(&self) -> u32301     pub fn reserved(&self) -> u32 {
302         unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) }
303     }
304     #[inline]
set_reserved(&mut self, val: u32)305     pub fn set_reserved(&mut self, val: u32) {
306         unsafe {
307             let val: u32 = ::std::mem::transmute(val);
308             self._bitfield_1.set(4usize, 28u8, val as u64)
309         }
310     }
311     #[inline]
new_bitfield_1( sti_blocking: u32, movss_blocking: u32, smi_blocking: u32, nmi_blocking: u32, reserved: u32, ) -> __BindgenBitfieldUnit<[u8; 4usize]>312     pub fn new_bitfield_1(
313         sti_blocking: u32,
314         movss_blocking: u32,
315         smi_blocking: u32,
316         nmi_blocking: u32,
317         reserved: u32,
318     ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
319         let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
320         __bindgen_bitfield_unit.set(0usize, 1u8, {
321             let sti_blocking: u32 = unsafe { ::std::mem::transmute(sti_blocking) };
322             sti_blocking as u64
323         });
324         __bindgen_bitfield_unit.set(1usize, 1u8, {
325             let movss_blocking: u32 = unsafe { ::std::mem::transmute(movss_blocking) };
326             movss_blocking as u64
327         });
328         __bindgen_bitfield_unit.set(2usize, 1u8, {
329             let smi_blocking: u32 = unsafe { ::std::mem::transmute(smi_blocking) };
330             smi_blocking as u64
331         });
332         __bindgen_bitfield_unit.set(3usize, 1u8, {
333             let nmi_blocking: u32 = unsafe { ::std::mem::transmute(nmi_blocking) };
334             nmi_blocking as u64
335         });
336         __bindgen_bitfield_unit.set(4usize, 28u8, {
337             let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
338             reserved as u64
339         });
340         __bindgen_bitfield_unit
341     }
342 }
343 #[test]
bindgen_test_layout_interruptibility_state_t()344 fn bindgen_test_layout_interruptibility_state_t() {
345     const UNINIT: ::std::mem::MaybeUninit<interruptibility_state_t> =
346         ::std::mem::MaybeUninit::uninit();
347     let ptr = UNINIT.as_ptr();
348     assert_eq!(
349         ::std::mem::size_of::<interruptibility_state_t>(),
350         8usize,
351         concat!("Size of: ", stringify!(interruptibility_state_t))
352     );
353     assert_eq!(
354         ::std::mem::align_of::<interruptibility_state_t>(),
355         1usize,
356         concat!("Alignment of ", stringify!(interruptibility_state_t))
357     );
358     assert_eq!(
359         unsafe { ::std::ptr::addr_of!((*ptr).raw) as usize - ptr as usize },
360         0usize,
361         concat!(
362             "Offset of field: ",
363             stringify!(interruptibility_state_t),
364             "::",
365             stringify!(raw)
366         )
367     );
368     assert_eq!(
369         unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize },
370         0usize,
371         concat!(
372             "Offset of field: ",
373             stringify!(interruptibility_state_t),
374             "::",
375             stringify!(pad)
376         )
377     );
378 }
379 impl Default for interruptibility_state_t {
default() -> Self380     fn default() -> Self {
381         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
382         unsafe {
383             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
384             s.assume_init()
385         }
386     }
387 }
388 #[repr(C, packed)]
389 #[derive(Copy, Clone)]
390 pub struct segment_desc_t {
391     pub selector: u16,
392     pub _dummy: u16,
393     pub limit: u32,
394     pub base: u64,
395     pub __bindgen_anon_1: segment_desc_t__bindgen_ty_1,
396     pub ipad: u32,
397 }
398 #[repr(C)]
399 #[derive(Copy, Clone)]
400 pub union segment_desc_t__bindgen_ty_1 {
401     pub __bindgen_anon_1: segment_desc_t__bindgen_ty_1__bindgen_ty_1,
402     pub ar: u32,
403 }
404 #[repr(C)]
405 #[derive(Debug, Default, Copy, Clone)]
406 pub struct segment_desc_t__bindgen_ty_1__bindgen_ty_1 {
407     pub _bitfield_align_1: [u8; 0],
408     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
409 }
410 #[test]
bindgen_test_layout_segment_desc_t__bindgen_ty_1__bindgen_ty_1()411 fn bindgen_test_layout_segment_desc_t__bindgen_ty_1__bindgen_ty_1() {
412     assert_eq!(
413         ::std::mem::size_of::<segment_desc_t__bindgen_ty_1__bindgen_ty_1>(),
414         4usize,
415         concat!(
416             "Size of: ",
417             stringify!(segment_desc_t__bindgen_ty_1__bindgen_ty_1)
418         )
419     );
420 }
421 impl segment_desc_t__bindgen_ty_1__bindgen_ty_1 {
422     #[inline]
type_(&self) -> u32423     pub fn type_(&self) -> u32 {
424         unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u32) }
425     }
426     #[inline]
set_type(&mut self, val: u32)427     pub fn set_type(&mut self, val: u32) {
428         unsafe {
429             let val: u32 = ::std::mem::transmute(val);
430             self._bitfield_1.set(0usize, 4u8, val as u64)
431         }
432     }
433     #[inline]
desc(&self) -> u32434     pub fn desc(&self) -> u32 {
435         unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
436     }
437     #[inline]
set_desc(&mut self, val: u32)438     pub fn set_desc(&mut self, val: u32) {
439         unsafe {
440             let val: u32 = ::std::mem::transmute(val);
441             self._bitfield_1.set(4usize, 1u8, val as u64)
442         }
443     }
444     #[inline]
dpl(&self) -> u32445     pub fn dpl(&self) -> u32 {
446         unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 2u8) as u32) }
447     }
448     #[inline]
set_dpl(&mut self, val: u32)449     pub fn set_dpl(&mut self, val: u32) {
450         unsafe {
451             let val: u32 = ::std::mem::transmute(val);
452             self._bitfield_1.set(5usize, 2u8, val as u64)
453         }
454     }
455     #[inline]
present(&self) -> u32456     pub fn present(&self) -> u32 {
457         unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
458     }
459     #[inline]
set_present(&mut self, val: u32)460     pub fn set_present(&mut self, val: u32) {
461         unsafe {
462             let val: u32 = ::std::mem::transmute(val);
463             self._bitfield_1.set(7usize, 1u8, val as u64)
464         }
465     }
466     #[inline]
available(&self) -> u32467     pub fn available(&self) -> u32 {
468         unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
469     }
470     #[inline]
set_available(&mut self, val: u32)471     pub fn set_available(&mut self, val: u32) {
472         unsafe {
473             let val: u32 = ::std::mem::transmute(val);
474             self._bitfield_1.set(12usize, 1u8, val as u64)
475         }
476     }
477     #[inline]
long_mode(&self) -> u32478     pub fn long_mode(&self) -> u32 {
479         unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
480     }
481     #[inline]
set_long_mode(&mut self, val: u32)482     pub fn set_long_mode(&mut self, val: u32) {
483         unsafe {
484             let val: u32 = ::std::mem::transmute(val);
485             self._bitfield_1.set(13usize, 1u8, val as u64)
486         }
487     }
488     #[inline]
operand_size(&self) -> u32489     pub fn operand_size(&self) -> u32 {
490         unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
491     }
492     #[inline]
set_operand_size(&mut self, val: u32)493     pub fn set_operand_size(&mut self, val: u32) {
494         unsafe {
495             let val: u32 = ::std::mem::transmute(val);
496             self._bitfield_1.set(14usize, 1u8, val as u64)
497         }
498     }
499     #[inline]
granularity(&self) -> u32500     pub fn granularity(&self) -> u32 {
501         unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
502     }
503     #[inline]
set_granularity(&mut self, val: u32)504     pub fn set_granularity(&mut self, val: u32) {
505         unsafe {
506             let val: u32 = ::std::mem::transmute(val);
507             self._bitfield_1.set(15usize, 1u8, val as u64)
508         }
509     }
510     #[inline]
null(&self) -> u32511     pub fn null(&self) -> u32 {
512         unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) }
513     }
514     #[inline]
set_null(&mut self, val: u32)515     pub fn set_null(&mut self, val: u32) {
516         unsafe {
517             let val: u32 = ::std::mem::transmute(val);
518             self._bitfield_1.set(16usize, 1u8, val as u64)
519         }
520     }
521     #[inline]
new_bitfield_1( type_: u32, desc: u32, dpl: u32, present: u32, available: u32, long_mode: u32, operand_size: u32, granularity: u32, null: u32, ) -> __BindgenBitfieldUnit<[u8; 4usize]>522     pub fn new_bitfield_1(
523         type_: u32,
524         desc: u32,
525         dpl: u32,
526         present: u32,
527         available: u32,
528         long_mode: u32,
529         operand_size: u32,
530         granularity: u32,
531         null: u32,
532     ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
533         let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
534         __bindgen_bitfield_unit.set(0usize, 4u8, {
535             let type_: u32 = unsafe { ::std::mem::transmute(type_) };
536             type_ as u64
537         });
538         __bindgen_bitfield_unit.set(4usize, 1u8, {
539             let desc: u32 = unsafe { ::std::mem::transmute(desc) };
540             desc as u64
541         });
542         __bindgen_bitfield_unit.set(5usize, 2u8, {
543             let dpl: u32 = unsafe { ::std::mem::transmute(dpl) };
544             dpl as u64
545         });
546         __bindgen_bitfield_unit.set(7usize, 1u8, {
547             let present: u32 = unsafe { ::std::mem::transmute(present) };
548             present as u64
549         });
550         __bindgen_bitfield_unit.set(12usize, 1u8, {
551             let available: u32 = unsafe { ::std::mem::transmute(available) };
552             available as u64
553         });
554         __bindgen_bitfield_unit.set(13usize, 1u8, {
555             let long_mode: u32 = unsafe { ::std::mem::transmute(long_mode) };
556             long_mode as u64
557         });
558         __bindgen_bitfield_unit.set(14usize, 1u8, {
559             let operand_size: u32 = unsafe { ::std::mem::transmute(operand_size) };
560             operand_size as u64
561         });
562         __bindgen_bitfield_unit.set(15usize, 1u8, {
563             let granularity: u32 = unsafe { ::std::mem::transmute(granularity) };
564             granularity as u64
565         });
566         __bindgen_bitfield_unit.set(16usize, 1u8, {
567             let null: u32 = unsafe { ::std::mem::transmute(null) };
568             null as u64
569         });
570         __bindgen_bitfield_unit
571     }
572 }
573 #[test]
bindgen_test_layout_segment_desc_t__bindgen_ty_1()574 fn bindgen_test_layout_segment_desc_t__bindgen_ty_1() {
575     const UNINIT: ::std::mem::MaybeUninit<segment_desc_t__bindgen_ty_1> =
576         ::std::mem::MaybeUninit::uninit();
577     let ptr = UNINIT.as_ptr();
578     assert_eq!(
579         ::std::mem::size_of::<segment_desc_t__bindgen_ty_1>(),
580         4usize,
581         concat!("Size of: ", stringify!(segment_desc_t__bindgen_ty_1))
582     );
583     assert_eq!(
584         ::std::mem::align_of::<segment_desc_t__bindgen_ty_1>(),
585         4usize,
586         concat!("Alignment of ", stringify!(segment_desc_t__bindgen_ty_1))
587     );
588     assert_eq!(
589         unsafe { ::std::ptr::addr_of!((*ptr).ar) as usize - ptr as usize },
590         0usize,
591         concat!(
592             "Offset of field: ",
593             stringify!(segment_desc_t__bindgen_ty_1),
594             "::",
595             stringify!(ar)
596         )
597     );
598 }
599 impl Default for segment_desc_t__bindgen_ty_1 {
default() -> Self600     fn default() -> Self {
601         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
602         unsafe {
603             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
604             s.assume_init()
605         }
606     }
607 }
608 #[test]
bindgen_test_layout_segment_desc_t()609 fn bindgen_test_layout_segment_desc_t() {
610     const UNINIT: ::std::mem::MaybeUninit<segment_desc_t> = ::std::mem::MaybeUninit::uninit();
611     let ptr = UNINIT.as_ptr();
612     assert_eq!(
613         ::std::mem::size_of::<segment_desc_t>(),
614         24usize,
615         concat!("Size of: ", stringify!(segment_desc_t))
616     );
617     assert_eq!(
618         ::std::mem::align_of::<segment_desc_t>(),
619         1usize,
620         concat!("Alignment of ", stringify!(segment_desc_t))
621     );
622     assert_eq!(
623         unsafe { ::std::ptr::addr_of!((*ptr).selector) as usize - ptr as usize },
624         0usize,
625         concat!(
626             "Offset of field: ",
627             stringify!(segment_desc_t),
628             "::",
629             stringify!(selector)
630         )
631     );
632     assert_eq!(
633         unsafe { ::std::ptr::addr_of!((*ptr)._dummy) as usize - ptr as usize },
634         2usize,
635         concat!(
636             "Offset of field: ",
637             stringify!(segment_desc_t),
638             "::",
639             stringify!(_dummy)
640         )
641     );
642     assert_eq!(
643         unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize },
644         4usize,
645         concat!(
646             "Offset of field: ",
647             stringify!(segment_desc_t),
648             "::",
649             stringify!(limit)
650         )
651     );
652     assert_eq!(
653         unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize },
654         8usize,
655         concat!(
656             "Offset of field: ",
657             stringify!(segment_desc_t),
658             "::",
659             stringify!(base)
660         )
661     );
662     assert_eq!(
663         unsafe { ::std::ptr::addr_of!((*ptr).ipad) as usize - ptr as usize },
664         20usize,
665         concat!(
666             "Offset of field: ",
667             stringify!(segment_desc_t),
668             "::",
669             stringify!(ipad)
670         )
671     );
672 }
673 impl Default for segment_desc_t {
default() -> Self674     fn default() -> Self {
675         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
676         unsafe {
677             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
678             s.assume_init()
679         }
680     }
681 }
682 #[repr(C, packed)]
683 #[derive(Copy, Clone)]
684 pub struct vcpu_state_t {
685     pub __bindgen_anon_1: vcpu_state_t__bindgen_ty_1,
686     pub __bindgen_anon_2: vcpu_state_t__bindgen_ty_2,
687     pub __bindgen_anon_3: vcpu_state_t__bindgen_ty_3,
688     pub _cs: segment_desc_t,
689     pub _ss: segment_desc_t,
690     pub _ds: segment_desc_t,
691     pub _es: segment_desc_t,
692     pub _fs: segment_desc_t,
693     pub _gs: segment_desc_t,
694     pub _ldt: segment_desc_t,
695     pub _tr: segment_desc_t,
696     pub _gdt: segment_desc_t,
697     pub _idt: segment_desc_t,
698     pub _cr0: u64,
699     pub _cr2: u64,
700     pub _cr3: u64,
701     pub _cr4: u64,
702     pub _dr0: u64,
703     pub _dr1: u64,
704     pub _dr2: u64,
705     pub _dr3: u64,
706     pub _dr6: u64,
707     pub _dr7: u64,
708     pub _pde: u64,
709     pub _efer: u32,
710     pub _sysenter_cs: u32,
711     pub _sysenter_eip: u64,
712     pub _sysenter_esp: u64,
713     pub _activity_state: u32,
714     pub pad: u32,
715     pub _interruptibility_state: interruptibility_state_t,
716 }
717 #[repr(C)]
718 #[derive(Copy, Clone)]
719 pub union vcpu_state_t__bindgen_ty_1 {
720     pub _regs: [u64; 16usize],
721     pub __bindgen_anon_1: vcpu_state_t__bindgen_ty_1__bindgen_ty_1,
722 }
723 #[repr(C)]
724 #[derive(Copy, Clone)]
725 pub struct vcpu_state_t__bindgen_ty_1__bindgen_ty_1 {
726     pub __bindgen_anon_1: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
727     pub __bindgen_anon_2: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2,
728     pub __bindgen_anon_3: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3,
729     pub __bindgen_anon_4: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4,
730     pub __bindgen_anon_5: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5,
731     pub __bindgen_anon_6: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6,
732     pub __bindgen_anon_7: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7,
733     pub __bindgen_anon_8: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8,
734     pub _r8: u64,
735     pub _r9: u64,
736     pub _r10: u64,
737     pub _r11: u64,
738     pub _r12: u64,
739     pub _r13: u64,
740     pub _r14: u64,
741     pub _r15: u64,
742 }
743 #[repr(C)]
744 #[derive(Copy, Clone)]
745 pub union vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
746     pub __bindgen_anon_1: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
747     pub _ax: u16,
748     pub _eax: u32,
749     pub _rax: u64,
750 }
751 #[repr(C)]
752 #[derive(Debug, Default, Copy, Clone)]
753 pub struct vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
754     pub _al: u8,
755     pub _ah: u8,
756 }
757 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1()758 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() {
759     const UNINIT: ::std::mem::MaybeUninit<
760         vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
761     > = ::std::mem::MaybeUninit::uninit();
762     let ptr = UNINIT.as_ptr();
763     assert_eq!(
764         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(
765         ),
766         2usize,
767         concat!(
768             "Size of: ",
769             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
770         )
771     );
772     assert_eq!(
773         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(
774         ),
775         1usize,
776         concat!(
777             "Alignment of ",
778             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
779         )
780     );
781     assert_eq!(
782         unsafe { ::std::ptr::addr_of!((*ptr)._al) as usize - ptr as usize },
783         0usize,
784         concat!(
785             "Offset of field: ",
786             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
787             "::",
788             stringify!(_al)
789         )
790     );
791     assert_eq!(
792         unsafe { ::std::ptr::addr_of!((*ptr)._ah) as usize - ptr as usize },
793         1usize,
794         concat!(
795             "Offset of field: ",
796             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
797             "::",
798             stringify!(_ah)
799         )
800     );
801 }
802 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1()803 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() {
804     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1> =
805         ::std::mem::MaybeUninit::uninit();
806     let ptr = UNINIT.as_ptr();
807     assert_eq!(
808         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
809         8usize,
810         concat!(
811             "Size of: ",
812             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
813         )
814     );
815     assert_eq!(
816         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
817         8usize,
818         concat!(
819             "Alignment of ",
820             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
821         )
822     );
823     assert_eq!(
824         unsafe { ::std::ptr::addr_of!((*ptr)._ax) as usize - ptr as usize },
825         0usize,
826         concat!(
827             "Offset of field: ",
828             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
829             "::",
830             stringify!(_ax)
831         )
832     );
833     assert_eq!(
834         unsafe { ::std::ptr::addr_of!((*ptr)._eax) as usize - ptr as usize },
835         0usize,
836         concat!(
837             "Offset of field: ",
838             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
839             "::",
840             stringify!(_eax)
841         )
842     );
843     assert_eq!(
844         unsafe { ::std::ptr::addr_of!((*ptr)._rax) as usize - ptr as usize },
845         0usize,
846         concat!(
847             "Offset of field: ",
848             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
849             "::",
850             stringify!(_rax)
851         )
852     );
853 }
854 impl Default for vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
default() -> Self855     fn default() -> Self {
856         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
857         unsafe {
858             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
859             s.assume_init()
860         }
861     }
862 }
863 #[repr(C)]
864 #[derive(Copy, Clone)]
865 pub union vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 {
866     pub __bindgen_anon_1: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1,
867     pub _cx: u16,
868     pub _ecx: u32,
869     pub _rcx: u64,
870 }
871 #[repr(C)]
872 #[derive(Debug, Default, Copy, Clone)]
873 pub struct vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 {
874     pub _cl: u8,
875     pub _ch: u8,
876 }
877 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1()878 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1() {
879     const UNINIT: ::std::mem::MaybeUninit<
880         vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1,
881     > = ::std::mem::MaybeUninit::uninit();
882     let ptr = UNINIT.as_ptr();
883     assert_eq!(
884         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1>(
885         ),
886         2usize,
887         concat!(
888             "Size of: ",
889             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1)
890         )
891     );
892     assert_eq!(
893         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1>(
894         ),
895         1usize,
896         concat!(
897             "Alignment of ",
898             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1)
899         )
900     );
901     assert_eq!(
902         unsafe { ::std::ptr::addr_of!((*ptr)._cl) as usize - ptr as usize },
903         0usize,
904         concat!(
905             "Offset of field: ",
906             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1),
907             "::",
908             stringify!(_cl)
909         )
910     );
911     assert_eq!(
912         unsafe { ::std::ptr::addr_of!((*ptr)._ch) as usize - ptr as usize },
913         1usize,
914         concat!(
915             "Offset of field: ",
916             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1),
917             "::",
918             stringify!(_ch)
919         )
920     );
921 }
922 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2()923 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2() {
924     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2> =
925         ::std::mem::MaybeUninit::uninit();
926     let ptr = UNINIT.as_ptr();
927     assert_eq!(
928         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2>(),
929         8usize,
930         concat!(
931             "Size of: ",
932             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2)
933         )
934     );
935     assert_eq!(
936         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2>(),
937         8usize,
938         concat!(
939             "Alignment of ",
940             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2)
941         )
942     );
943     assert_eq!(
944         unsafe { ::std::ptr::addr_of!((*ptr)._cx) as usize - ptr as usize },
945         0usize,
946         concat!(
947             "Offset of field: ",
948             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2),
949             "::",
950             stringify!(_cx)
951         )
952     );
953     assert_eq!(
954         unsafe { ::std::ptr::addr_of!((*ptr)._ecx) as usize - ptr as usize },
955         0usize,
956         concat!(
957             "Offset of field: ",
958             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2),
959             "::",
960             stringify!(_ecx)
961         )
962     );
963     assert_eq!(
964         unsafe { ::std::ptr::addr_of!((*ptr)._rcx) as usize - ptr as usize },
965         0usize,
966         concat!(
967             "Offset of field: ",
968             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2),
969             "::",
970             stringify!(_rcx)
971         )
972     );
973 }
974 impl Default for vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_2 {
default() -> Self975     fn default() -> Self {
976         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
977         unsafe {
978             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
979             s.assume_init()
980         }
981     }
982 }
983 #[repr(C)]
984 #[derive(Copy, Clone)]
985 pub union vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3 {
986     pub __bindgen_anon_1: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1,
987     pub _dx: u16,
988     pub _edx: u32,
989     pub _rdx: u64,
990 }
991 #[repr(C)]
992 #[derive(Debug, Default, Copy, Clone)]
993 pub struct vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1 {
994     pub _dl: u8,
995     pub _dh: u8,
996 }
997 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1()998 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1() {
999     const UNINIT: ::std::mem::MaybeUninit<
1000         vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1,
1001     > = ::std::mem::MaybeUninit::uninit();
1002     let ptr = UNINIT.as_ptr();
1003     assert_eq!(
1004         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1>(
1005         ),
1006         2usize,
1007         concat!(
1008             "Size of: ",
1009             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1)
1010         )
1011     );
1012     assert_eq!(
1013         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1>(
1014         ),
1015         1usize,
1016         concat!(
1017             "Alignment of ",
1018             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1)
1019         )
1020     );
1021     assert_eq!(
1022         unsafe { ::std::ptr::addr_of!((*ptr)._dl) as usize - ptr as usize },
1023         0usize,
1024         concat!(
1025             "Offset of field: ",
1026             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1),
1027             "::",
1028             stringify!(_dl)
1029         )
1030     );
1031     assert_eq!(
1032         unsafe { ::std::ptr::addr_of!((*ptr)._dh) as usize - ptr as usize },
1033         1usize,
1034         concat!(
1035             "Offset of field: ",
1036             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3__bindgen_ty_1),
1037             "::",
1038             stringify!(_dh)
1039         )
1040     );
1041 }
1042 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3()1043 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3() {
1044     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3> =
1045         ::std::mem::MaybeUninit::uninit();
1046     let ptr = UNINIT.as_ptr();
1047     assert_eq!(
1048         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3>(),
1049         8usize,
1050         concat!(
1051             "Size of: ",
1052             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3)
1053         )
1054     );
1055     assert_eq!(
1056         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3>(),
1057         8usize,
1058         concat!(
1059             "Alignment of ",
1060             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3)
1061         )
1062     );
1063     assert_eq!(
1064         unsafe { ::std::ptr::addr_of!((*ptr)._dx) as usize - ptr as usize },
1065         0usize,
1066         concat!(
1067             "Offset of field: ",
1068             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3),
1069             "::",
1070             stringify!(_dx)
1071         )
1072     );
1073     assert_eq!(
1074         unsafe { ::std::ptr::addr_of!((*ptr)._edx) as usize - ptr as usize },
1075         0usize,
1076         concat!(
1077             "Offset of field: ",
1078             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3),
1079             "::",
1080             stringify!(_edx)
1081         )
1082     );
1083     assert_eq!(
1084         unsafe { ::std::ptr::addr_of!((*ptr)._rdx) as usize - ptr as usize },
1085         0usize,
1086         concat!(
1087             "Offset of field: ",
1088             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3),
1089             "::",
1090             stringify!(_rdx)
1091         )
1092     );
1093 }
1094 impl Default for vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_3 {
default() -> Self1095     fn default() -> Self {
1096         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1097         unsafe {
1098             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1099             s.assume_init()
1100         }
1101     }
1102 }
1103 #[repr(C)]
1104 #[derive(Copy, Clone)]
1105 pub union vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4 {
1106     pub __bindgen_anon_1: vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1,
1107     pub _bx: u16,
1108     pub _ebx: u32,
1109     pub _rbx: u64,
1110 }
1111 #[repr(C)]
1112 #[derive(Debug, Default, Copy, Clone)]
1113 pub struct vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1 {
1114     pub _bl: u8,
1115     pub _bh: u8,
1116 }
1117 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1()1118 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1() {
1119     const UNINIT: ::std::mem::MaybeUninit<
1120         vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1,
1121     > = ::std::mem::MaybeUninit::uninit();
1122     let ptr = UNINIT.as_ptr();
1123     assert_eq!(
1124         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1>(
1125         ),
1126         2usize,
1127         concat!(
1128             "Size of: ",
1129             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1)
1130         )
1131     );
1132     assert_eq!(
1133         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1>(
1134         ),
1135         1usize,
1136         concat!(
1137             "Alignment of ",
1138             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1)
1139         )
1140     );
1141     assert_eq!(
1142         unsafe { ::std::ptr::addr_of!((*ptr)._bl) as usize - ptr as usize },
1143         0usize,
1144         concat!(
1145             "Offset of field: ",
1146             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1),
1147             "::",
1148             stringify!(_bl)
1149         )
1150     );
1151     assert_eq!(
1152         unsafe { ::std::ptr::addr_of!((*ptr)._bh) as usize - ptr as usize },
1153         1usize,
1154         concat!(
1155             "Offset of field: ",
1156             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4__bindgen_ty_1),
1157             "::",
1158             stringify!(_bh)
1159         )
1160     );
1161 }
1162 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4()1163 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4() {
1164     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4> =
1165         ::std::mem::MaybeUninit::uninit();
1166     let ptr = UNINIT.as_ptr();
1167     assert_eq!(
1168         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4>(),
1169         8usize,
1170         concat!(
1171             "Size of: ",
1172             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4)
1173         )
1174     );
1175     assert_eq!(
1176         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4>(),
1177         8usize,
1178         concat!(
1179             "Alignment of ",
1180             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4)
1181         )
1182     );
1183     assert_eq!(
1184         unsafe { ::std::ptr::addr_of!((*ptr)._bx) as usize - ptr as usize },
1185         0usize,
1186         concat!(
1187             "Offset of field: ",
1188             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4),
1189             "::",
1190             stringify!(_bx)
1191         )
1192     );
1193     assert_eq!(
1194         unsafe { ::std::ptr::addr_of!((*ptr)._ebx) as usize - ptr as usize },
1195         0usize,
1196         concat!(
1197             "Offset of field: ",
1198             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4),
1199             "::",
1200             stringify!(_ebx)
1201         )
1202     );
1203     assert_eq!(
1204         unsafe { ::std::ptr::addr_of!((*ptr)._rbx) as usize - ptr as usize },
1205         0usize,
1206         concat!(
1207             "Offset of field: ",
1208             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4),
1209             "::",
1210             stringify!(_rbx)
1211         )
1212     );
1213 }
1214 impl Default for vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_4 {
default() -> Self1215     fn default() -> Self {
1216         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1217         unsafe {
1218             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1219             s.assume_init()
1220         }
1221     }
1222 }
1223 #[repr(C)]
1224 #[derive(Copy, Clone)]
1225 pub union vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5 {
1226     pub _sp: u16,
1227     pub _esp: u32,
1228     pub _rsp: u64,
1229 }
1230 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5()1231 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5() {
1232     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5> =
1233         ::std::mem::MaybeUninit::uninit();
1234     let ptr = UNINIT.as_ptr();
1235     assert_eq!(
1236         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5>(),
1237         8usize,
1238         concat!(
1239             "Size of: ",
1240             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5)
1241         )
1242     );
1243     assert_eq!(
1244         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5>(),
1245         8usize,
1246         concat!(
1247             "Alignment of ",
1248             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5)
1249         )
1250     );
1251     assert_eq!(
1252         unsafe { ::std::ptr::addr_of!((*ptr)._sp) as usize - ptr as usize },
1253         0usize,
1254         concat!(
1255             "Offset of field: ",
1256             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5),
1257             "::",
1258             stringify!(_sp)
1259         )
1260     );
1261     assert_eq!(
1262         unsafe { ::std::ptr::addr_of!((*ptr)._esp) as usize - ptr as usize },
1263         0usize,
1264         concat!(
1265             "Offset of field: ",
1266             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5),
1267             "::",
1268             stringify!(_esp)
1269         )
1270     );
1271     assert_eq!(
1272         unsafe { ::std::ptr::addr_of!((*ptr)._rsp) as usize - ptr as usize },
1273         0usize,
1274         concat!(
1275             "Offset of field: ",
1276             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5),
1277             "::",
1278             stringify!(_rsp)
1279         )
1280     );
1281 }
1282 impl Default for vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_5 {
default() -> Self1283     fn default() -> Self {
1284         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1285         unsafe {
1286             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1287             s.assume_init()
1288         }
1289     }
1290 }
1291 #[repr(C)]
1292 #[derive(Copy, Clone)]
1293 pub union vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6 {
1294     pub _bp: u16,
1295     pub _ebp: u32,
1296     pub _rbp: u64,
1297 }
1298 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6()1299 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6() {
1300     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6> =
1301         ::std::mem::MaybeUninit::uninit();
1302     let ptr = UNINIT.as_ptr();
1303     assert_eq!(
1304         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6>(),
1305         8usize,
1306         concat!(
1307             "Size of: ",
1308             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6)
1309         )
1310     );
1311     assert_eq!(
1312         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6>(),
1313         8usize,
1314         concat!(
1315             "Alignment of ",
1316             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6)
1317         )
1318     );
1319     assert_eq!(
1320         unsafe { ::std::ptr::addr_of!((*ptr)._bp) as usize - ptr as usize },
1321         0usize,
1322         concat!(
1323             "Offset of field: ",
1324             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6),
1325             "::",
1326             stringify!(_bp)
1327         )
1328     );
1329     assert_eq!(
1330         unsafe { ::std::ptr::addr_of!((*ptr)._ebp) as usize - ptr as usize },
1331         0usize,
1332         concat!(
1333             "Offset of field: ",
1334             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6),
1335             "::",
1336             stringify!(_ebp)
1337         )
1338     );
1339     assert_eq!(
1340         unsafe { ::std::ptr::addr_of!((*ptr)._rbp) as usize - ptr as usize },
1341         0usize,
1342         concat!(
1343             "Offset of field: ",
1344             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6),
1345             "::",
1346             stringify!(_rbp)
1347         )
1348     );
1349 }
1350 impl Default for vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_6 {
default() -> Self1351     fn default() -> Self {
1352         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1353         unsafe {
1354             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1355             s.assume_init()
1356         }
1357     }
1358 }
1359 #[repr(C)]
1360 #[derive(Copy, Clone)]
1361 pub union vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7 {
1362     pub _si: u16,
1363     pub _esi: u32,
1364     pub _rsi: u64,
1365 }
1366 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7()1367 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7() {
1368     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7> =
1369         ::std::mem::MaybeUninit::uninit();
1370     let ptr = UNINIT.as_ptr();
1371     assert_eq!(
1372         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7>(),
1373         8usize,
1374         concat!(
1375             "Size of: ",
1376             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7)
1377         )
1378     );
1379     assert_eq!(
1380         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7>(),
1381         8usize,
1382         concat!(
1383             "Alignment of ",
1384             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7)
1385         )
1386     );
1387     assert_eq!(
1388         unsafe { ::std::ptr::addr_of!((*ptr)._si) as usize - ptr as usize },
1389         0usize,
1390         concat!(
1391             "Offset of field: ",
1392             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7),
1393             "::",
1394             stringify!(_si)
1395         )
1396     );
1397     assert_eq!(
1398         unsafe { ::std::ptr::addr_of!((*ptr)._esi) as usize - ptr as usize },
1399         0usize,
1400         concat!(
1401             "Offset of field: ",
1402             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7),
1403             "::",
1404             stringify!(_esi)
1405         )
1406     );
1407     assert_eq!(
1408         unsafe { ::std::ptr::addr_of!((*ptr)._rsi) as usize - ptr as usize },
1409         0usize,
1410         concat!(
1411             "Offset of field: ",
1412             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7),
1413             "::",
1414             stringify!(_rsi)
1415         )
1416     );
1417 }
1418 impl Default for vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_7 {
default() -> Self1419     fn default() -> Self {
1420         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1421         unsafe {
1422             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1423             s.assume_init()
1424         }
1425     }
1426 }
1427 #[repr(C)]
1428 #[derive(Copy, Clone)]
1429 pub union vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8 {
1430     pub _di: u16,
1431     pub _edi: u32,
1432     pub _rdi: u64,
1433 }
1434 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8()1435 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8() {
1436     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8> =
1437         ::std::mem::MaybeUninit::uninit();
1438     let ptr = UNINIT.as_ptr();
1439     assert_eq!(
1440         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8>(),
1441         8usize,
1442         concat!(
1443             "Size of: ",
1444             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8)
1445         )
1446     );
1447     assert_eq!(
1448         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8>(),
1449         8usize,
1450         concat!(
1451             "Alignment of ",
1452             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8)
1453         )
1454     );
1455     assert_eq!(
1456         unsafe { ::std::ptr::addr_of!((*ptr)._di) as usize - ptr as usize },
1457         0usize,
1458         concat!(
1459             "Offset of field: ",
1460             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8),
1461             "::",
1462             stringify!(_di)
1463         )
1464     );
1465     assert_eq!(
1466         unsafe { ::std::ptr::addr_of!((*ptr)._edi) as usize - ptr as usize },
1467         0usize,
1468         concat!(
1469             "Offset of field: ",
1470             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8),
1471             "::",
1472             stringify!(_edi)
1473         )
1474     );
1475     assert_eq!(
1476         unsafe { ::std::ptr::addr_of!((*ptr)._rdi) as usize - ptr as usize },
1477         0usize,
1478         concat!(
1479             "Offset of field: ",
1480             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8),
1481             "::",
1482             stringify!(_rdi)
1483         )
1484     );
1485 }
1486 impl Default for vcpu_state_t__bindgen_ty_1__bindgen_ty_1__bindgen_ty_8 {
default() -> Self1487     fn default() -> Self {
1488         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1489         unsafe {
1490             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1491             s.assume_init()
1492         }
1493     }
1494 }
1495 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1()1496 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1__bindgen_ty_1() {
1497     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_1__bindgen_ty_1> =
1498         ::std::mem::MaybeUninit::uninit();
1499     let ptr = UNINIT.as_ptr();
1500     assert_eq!(
1501         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1>(),
1502         128usize,
1503         concat!(
1504             "Size of: ",
1505             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1)
1506         )
1507     );
1508     assert_eq!(
1509         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1__bindgen_ty_1>(),
1510         8usize,
1511         concat!(
1512             "Alignment of ",
1513             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1)
1514         )
1515     );
1516     assert_eq!(
1517         unsafe { ::std::ptr::addr_of!((*ptr)._r8) as usize - ptr as usize },
1518         64usize,
1519         concat!(
1520             "Offset of field: ",
1521             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1),
1522             "::",
1523             stringify!(_r8)
1524         )
1525     );
1526     assert_eq!(
1527         unsafe { ::std::ptr::addr_of!((*ptr)._r9) as usize - ptr as usize },
1528         72usize,
1529         concat!(
1530             "Offset of field: ",
1531             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1),
1532             "::",
1533             stringify!(_r9)
1534         )
1535     );
1536     assert_eq!(
1537         unsafe { ::std::ptr::addr_of!((*ptr)._r10) as usize - ptr as usize },
1538         80usize,
1539         concat!(
1540             "Offset of field: ",
1541             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1),
1542             "::",
1543             stringify!(_r10)
1544         )
1545     );
1546     assert_eq!(
1547         unsafe { ::std::ptr::addr_of!((*ptr)._r11) as usize - ptr as usize },
1548         88usize,
1549         concat!(
1550             "Offset of field: ",
1551             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1),
1552             "::",
1553             stringify!(_r11)
1554         )
1555     );
1556     assert_eq!(
1557         unsafe { ::std::ptr::addr_of!((*ptr)._r12) as usize - ptr as usize },
1558         96usize,
1559         concat!(
1560             "Offset of field: ",
1561             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1),
1562             "::",
1563             stringify!(_r12)
1564         )
1565     );
1566     assert_eq!(
1567         unsafe { ::std::ptr::addr_of!((*ptr)._r13) as usize - ptr as usize },
1568         104usize,
1569         concat!(
1570             "Offset of field: ",
1571             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1),
1572             "::",
1573             stringify!(_r13)
1574         )
1575     );
1576     assert_eq!(
1577         unsafe { ::std::ptr::addr_of!((*ptr)._r14) as usize - ptr as usize },
1578         112usize,
1579         concat!(
1580             "Offset of field: ",
1581             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1),
1582             "::",
1583             stringify!(_r14)
1584         )
1585     );
1586     assert_eq!(
1587         unsafe { ::std::ptr::addr_of!((*ptr)._r15) as usize - ptr as usize },
1588         120usize,
1589         concat!(
1590             "Offset of field: ",
1591             stringify!(vcpu_state_t__bindgen_ty_1__bindgen_ty_1),
1592             "::",
1593             stringify!(_r15)
1594         )
1595     );
1596 }
1597 impl Default for vcpu_state_t__bindgen_ty_1__bindgen_ty_1 {
default() -> Self1598     fn default() -> Self {
1599         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1600         unsafe {
1601             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1602             s.assume_init()
1603         }
1604     }
1605 }
1606 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_1()1607 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_1() {
1608     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_1> =
1609         ::std::mem::MaybeUninit::uninit();
1610     let ptr = UNINIT.as_ptr();
1611     assert_eq!(
1612         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_1>(),
1613         128usize,
1614         concat!("Size of: ", stringify!(vcpu_state_t__bindgen_ty_1))
1615     );
1616     assert_eq!(
1617         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_1>(),
1618         8usize,
1619         concat!("Alignment of ", stringify!(vcpu_state_t__bindgen_ty_1))
1620     );
1621     assert_eq!(
1622         unsafe { ::std::ptr::addr_of!((*ptr)._regs) as usize - ptr as usize },
1623         0usize,
1624         concat!(
1625             "Offset of field: ",
1626             stringify!(vcpu_state_t__bindgen_ty_1),
1627             "::",
1628             stringify!(_regs)
1629         )
1630     );
1631 }
1632 impl Default for vcpu_state_t__bindgen_ty_1 {
default() -> Self1633     fn default() -> Self {
1634         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1635         unsafe {
1636             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1637             s.assume_init()
1638         }
1639     }
1640 }
1641 #[repr(C)]
1642 #[derive(Copy, Clone)]
1643 pub union vcpu_state_t__bindgen_ty_2 {
1644     pub _eip: u32,
1645     pub _rip: u64,
1646 }
1647 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_2()1648 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_2() {
1649     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_2> =
1650         ::std::mem::MaybeUninit::uninit();
1651     let ptr = UNINIT.as_ptr();
1652     assert_eq!(
1653         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_2>(),
1654         8usize,
1655         concat!("Size of: ", stringify!(vcpu_state_t__bindgen_ty_2))
1656     );
1657     assert_eq!(
1658         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_2>(),
1659         8usize,
1660         concat!("Alignment of ", stringify!(vcpu_state_t__bindgen_ty_2))
1661     );
1662     assert_eq!(
1663         unsafe { ::std::ptr::addr_of!((*ptr)._eip) as usize - ptr as usize },
1664         0usize,
1665         concat!(
1666             "Offset of field: ",
1667             stringify!(vcpu_state_t__bindgen_ty_2),
1668             "::",
1669             stringify!(_eip)
1670         )
1671     );
1672     assert_eq!(
1673         unsafe { ::std::ptr::addr_of!((*ptr)._rip) as usize - ptr as usize },
1674         0usize,
1675         concat!(
1676             "Offset of field: ",
1677             stringify!(vcpu_state_t__bindgen_ty_2),
1678             "::",
1679             stringify!(_rip)
1680         )
1681     );
1682 }
1683 impl Default for vcpu_state_t__bindgen_ty_2 {
default() -> Self1684     fn default() -> Self {
1685         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1686         unsafe {
1687             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1688             s.assume_init()
1689         }
1690     }
1691 }
1692 #[repr(C)]
1693 #[derive(Copy, Clone)]
1694 pub union vcpu_state_t__bindgen_ty_3 {
1695     pub _eflags: u32,
1696     pub _rflags: u64,
1697 }
1698 #[test]
bindgen_test_layout_vcpu_state_t__bindgen_ty_3()1699 fn bindgen_test_layout_vcpu_state_t__bindgen_ty_3() {
1700     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t__bindgen_ty_3> =
1701         ::std::mem::MaybeUninit::uninit();
1702     let ptr = UNINIT.as_ptr();
1703     assert_eq!(
1704         ::std::mem::size_of::<vcpu_state_t__bindgen_ty_3>(),
1705         8usize,
1706         concat!("Size of: ", stringify!(vcpu_state_t__bindgen_ty_3))
1707     );
1708     assert_eq!(
1709         ::std::mem::align_of::<vcpu_state_t__bindgen_ty_3>(),
1710         8usize,
1711         concat!("Alignment of ", stringify!(vcpu_state_t__bindgen_ty_3))
1712     );
1713     assert_eq!(
1714         unsafe { ::std::ptr::addr_of!((*ptr)._eflags) as usize - ptr as usize },
1715         0usize,
1716         concat!(
1717             "Offset of field: ",
1718             stringify!(vcpu_state_t__bindgen_ty_3),
1719             "::",
1720             stringify!(_eflags)
1721         )
1722     );
1723     assert_eq!(
1724         unsafe { ::std::ptr::addr_of!((*ptr)._rflags) as usize - ptr as usize },
1725         0usize,
1726         concat!(
1727             "Offset of field: ",
1728             stringify!(vcpu_state_t__bindgen_ty_3),
1729             "::",
1730             stringify!(_rflags)
1731         )
1732     );
1733 }
1734 impl Default for vcpu_state_t__bindgen_ty_3 {
default() -> Self1735     fn default() -> Self {
1736         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1737         unsafe {
1738             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1739             s.assume_init()
1740         }
1741     }
1742 }
1743 #[test]
bindgen_test_layout_vcpu_state_t()1744 fn bindgen_test_layout_vcpu_state_t() {
1745     const UNINIT: ::std::mem::MaybeUninit<vcpu_state_t> = ::std::mem::MaybeUninit::uninit();
1746     let ptr = UNINIT.as_ptr();
1747     assert_eq!(
1748         ::std::mem::size_of::<vcpu_state_t>(),
1749         512usize,
1750         concat!("Size of: ", stringify!(vcpu_state_t))
1751     );
1752     assert_eq!(
1753         ::std::mem::align_of::<vcpu_state_t>(),
1754         1usize,
1755         concat!("Alignment of ", stringify!(vcpu_state_t))
1756     );
1757     assert_eq!(
1758         unsafe { ::std::ptr::addr_of!((*ptr)._cs) as usize - ptr as usize },
1759         144usize,
1760         concat!(
1761             "Offset of field: ",
1762             stringify!(vcpu_state_t),
1763             "::",
1764             stringify!(_cs)
1765         )
1766     );
1767     assert_eq!(
1768         unsafe { ::std::ptr::addr_of!((*ptr)._ss) as usize - ptr as usize },
1769         168usize,
1770         concat!(
1771             "Offset of field: ",
1772             stringify!(vcpu_state_t),
1773             "::",
1774             stringify!(_ss)
1775         )
1776     );
1777     assert_eq!(
1778         unsafe { ::std::ptr::addr_of!((*ptr)._ds) as usize - ptr as usize },
1779         192usize,
1780         concat!(
1781             "Offset of field: ",
1782             stringify!(vcpu_state_t),
1783             "::",
1784             stringify!(_ds)
1785         )
1786     );
1787     assert_eq!(
1788         unsafe { ::std::ptr::addr_of!((*ptr)._es) as usize - ptr as usize },
1789         216usize,
1790         concat!(
1791             "Offset of field: ",
1792             stringify!(vcpu_state_t),
1793             "::",
1794             stringify!(_es)
1795         )
1796     );
1797     assert_eq!(
1798         unsafe { ::std::ptr::addr_of!((*ptr)._fs) as usize - ptr as usize },
1799         240usize,
1800         concat!(
1801             "Offset of field: ",
1802             stringify!(vcpu_state_t),
1803             "::",
1804             stringify!(_fs)
1805         )
1806     );
1807     assert_eq!(
1808         unsafe { ::std::ptr::addr_of!((*ptr)._gs) as usize - ptr as usize },
1809         264usize,
1810         concat!(
1811             "Offset of field: ",
1812             stringify!(vcpu_state_t),
1813             "::",
1814             stringify!(_gs)
1815         )
1816     );
1817     assert_eq!(
1818         unsafe { ::std::ptr::addr_of!((*ptr)._ldt) as usize - ptr as usize },
1819         288usize,
1820         concat!(
1821             "Offset of field: ",
1822             stringify!(vcpu_state_t),
1823             "::",
1824             stringify!(_ldt)
1825         )
1826     );
1827     assert_eq!(
1828         unsafe { ::std::ptr::addr_of!((*ptr)._tr) as usize - ptr as usize },
1829         312usize,
1830         concat!(
1831             "Offset of field: ",
1832             stringify!(vcpu_state_t),
1833             "::",
1834             stringify!(_tr)
1835         )
1836     );
1837     assert_eq!(
1838         unsafe { ::std::ptr::addr_of!((*ptr)._gdt) as usize - ptr as usize },
1839         336usize,
1840         concat!(
1841             "Offset of field: ",
1842             stringify!(vcpu_state_t),
1843             "::",
1844             stringify!(_gdt)
1845         )
1846     );
1847     assert_eq!(
1848         unsafe { ::std::ptr::addr_of!((*ptr)._idt) as usize - ptr as usize },
1849         360usize,
1850         concat!(
1851             "Offset of field: ",
1852             stringify!(vcpu_state_t),
1853             "::",
1854             stringify!(_idt)
1855         )
1856     );
1857     assert_eq!(
1858         unsafe { ::std::ptr::addr_of!((*ptr)._cr0) as usize - ptr as usize },
1859         384usize,
1860         concat!(
1861             "Offset of field: ",
1862             stringify!(vcpu_state_t),
1863             "::",
1864             stringify!(_cr0)
1865         )
1866     );
1867     assert_eq!(
1868         unsafe { ::std::ptr::addr_of!((*ptr)._cr2) as usize - ptr as usize },
1869         392usize,
1870         concat!(
1871             "Offset of field: ",
1872             stringify!(vcpu_state_t),
1873             "::",
1874             stringify!(_cr2)
1875         )
1876     );
1877     assert_eq!(
1878         unsafe { ::std::ptr::addr_of!((*ptr)._cr3) as usize - ptr as usize },
1879         400usize,
1880         concat!(
1881             "Offset of field: ",
1882             stringify!(vcpu_state_t),
1883             "::",
1884             stringify!(_cr3)
1885         )
1886     );
1887     assert_eq!(
1888         unsafe { ::std::ptr::addr_of!((*ptr)._cr4) as usize - ptr as usize },
1889         408usize,
1890         concat!(
1891             "Offset of field: ",
1892             stringify!(vcpu_state_t),
1893             "::",
1894             stringify!(_cr4)
1895         )
1896     );
1897     assert_eq!(
1898         unsafe { ::std::ptr::addr_of!((*ptr)._dr0) as usize - ptr as usize },
1899         416usize,
1900         concat!(
1901             "Offset of field: ",
1902             stringify!(vcpu_state_t),
1903             "::",
1904             stringify!(_dr0)
1905         )
1906     );
1907     assert_eq!(
1908         unsafe { ::std::ptr::addr_of!((*ptr)._dr1) as usize - ptr as usize },
1909         424usize,
1910         concat!(
1911             "Offset of field: ",
1912             stringify!(vcpu_state_t),
1913             "::",
1914             stringify!(_dr1)
1915         )
1916     );
1917     assert_eq!(
1918         unsafe { ::std::ptr::addr_of!((*ptr)._dr2) as usize - ptr as usize },
1919         432usize,
1920         concat!(
1921             "Offset of field: ",
1922             stringify!(vcpu_state_t),
1923             "::",
1924             stringify!(_dr2)
1925         )
1926     );
1927     assert_eq!(
1928         unsafe { ::std::ptr::addr_of!((*ptr)._dr3) as usize - ptr as usize },
1929         440usize,
1930         concat!(
1931             "Offset of field: ",
1932             stringify!(vcpu_state_t),
1933             "::",
1934             stringify!(_dr3)
1935         )
1936     );
1937     assert_eq!(
1938         unsafe { ::std::ptr::addr_of!((*ptr)._dr6) as usize - ptr as usize },
1939         448usize,
1940         concat!(
1941             "Offset of field: ",
1942             stringify!(vcpu_state_t),
1943             "::",
1944             stringify!(_dr6)
1945         )
1946     );
1947     assert_eq!(
1948         unsafe { ::std::ptr::addr_of!((*ptr)._dr7) as usize - ptr as usize },
1949         456usize,
1950         concat!(
1951             "Offset of field: ",
1952             stringify!(vcpu_state_t),
1953             "::",
1954             stringify!(_dr7)
1955         )
1956     );
1957     assert_eq!(
1958         unsafe { ::std::ptr::addr_of!((*ptr)._pde) as usize - ptr as usize },
1959         464usize,
1960         concat!(
1961             "Offset of field: ",
1962             stringify!(vcpu_state_t),
1963             "::",
1964             stringify!(_pde)
1965         )
1966     );
1967     assert_eq!(
1968         unsafe { ::std::ptr::addr_of!((*ptr)._efer) as usize - ptr as usize },
1969         472usize,
1970         concat!(
1971             "Offset of field: ",
1972             stringify!(vcpu_state_t),
1973             "::",
1974             stringify!(_efer)
1975         )
1976     );
1977     assert_eq!(
1978         unsafe { ::std::ptr::addr_of!((*ptr)._sysenter_cs) as usize - ptr as usize },
1979         476usize,
1980         concat!(
1981             "Offset of field: ",
1982             stringify!(vcpu_state_t),
1983             "::",
1984             stringify!(_sysenter_cs)
1985         )
1986     );
1987     assert_eq!(
1988         unsafe { ::std::ptr::addr_of!((*ptr)._sysenter_eip) as usize - ptr as usize },
1989         480usize,
1990         concat!(
1991             "Offset of field: ",
1992             stringify!(vcpu_state_t),
1993             "::",
1994             stringify!(_sysenter_eip)
1995         )
1996     );
1997     assert_eq!(
1998         unsafe { ::std::ptr::addr_of!((*ptr)._sysenter_esp) as usize - ptr as usize },
1999         488usize,
2000         concat!(
2001             "Offset of field: ",
2002             stringify!(vcpu_state_t),
2003             "::",
2004             stringify!(_sysenter_esp)
2005         )
2006     );
2007     assert_eq!(
2008         unsafe { ::std::ptr::addr_of!((*ptr)._activity_state) as usize - ptr as usize },
2009         496usize,
2010         concat!(
2011             "Offset of field: ",
2012             stringify!(vcpu_state_t),
2013             "::",
2014             stringify!(_activity_state)
2015         )
2016     );
2017     assert_eq!(
2018         unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize },
2019         500usize,
2020         concat!(
2021             "Offset of field: ",
2022             stringify!(vcpu_state_t),
2023             "::",
2024             stringify!(pad)
2025         )
2026     );
2027     assert_eq!(
2028         unsafe { ::std::ptr::addr_of!((*ptr)._interruptibility_state) as usize - ptr as usize },
2029         504usize,
2030         concat!(
2031             "Offset of field: ",
2032             stringify!(vcpu_state_t),
2033             "::",
2034             stringify!(_interruptibility_state)
2035         )
2036     );
2037 }
2038 impl Default for vcpu_state_t {
default() -> Self2039     fn default() -> Self {
2040         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2041         unsafe {
2042             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2043             s.assume_init()
2044         }
2045     }
2046 }
2047 extern "C" {
dump()2048     pub fn dump();
2049 }
2050 #[repr(C, packed)]
2051 #[derive(Debug, Default, Copy, Clone)]
2052 pub struct vmx_msr {
2053     pub entry: u64,
2054     pub value: u64,
2055 }
2056 #[test]
bindgen_test_layout_vmx_msr()2057 fn bindgen_test_layout_vmx_msr() {
2058     const UNINIT: ::std::mem::MaybeUninit<vmx_msr> = ::std::mem::MaybeUninit::uninit();
2059     let ptr = UNINIT.as_ptr();
2060     assert_eq!(
2061         ::std::mem::size_of::<vmx_msr>(),
2062         16usize,
2063         concat!("Size of: ", stringify!(vmx_msr))
2064     );
2065     assert_eq!(
2066         ::std::mem::align_of::<vmx_msr>(),
2067         1usize,
2068         concat!("Alignment of ", stringify!(vmx_msr))
2069     );
2070     assert_eq!(
2071         unsafe { ::std::ptr::addr_of!((*ptr).entry) as usize - ptr as usize },
2072         0usize,
2073         concat!(
2074             "Offset of field: ",
2075             stringify!(vmx_msr),
2076             "::",
2077             stringify!(entry)
2078         )
2079     );
2080     assert_eq!(
2081         unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
2082         8usize,
2083         concat!(
2084             "Offset of field: ",
2085             stringify!(vmx_msr),
2086             "::",
2087             stringify!(value)
2088         )
2089     );
2090 }
2091 #[repr(C)]
2092 #[repr(align(16))]
2093 #[derive(Copy, Clone)]
2094 pub struct fx_layout {
2095     pub fcw: u16,
2096     pub fsw: u16,
2097     pub ftw: u8,
2098     pub res1: u8,
2099     pub fop: u16,
2100     pub __bindgen_anon_1: fx_layout__bindgen_ty_1,
2101     pub __bindgen_anon_2: fx_layout__bindgen_ty_2,
2102     pub mxcsr: u32,
2103     pub mxcsr_mask: u32,
2104     pub st_mm: [[u8; 16usize]; 8usize],
2105     pub mmx_1: [[u8; 16usize]; 8usize],
2106     pub mmx_2: [[u8; 16usize]; 8usize],
2107     pub pad: [u8; 96usize],
2108 }
2109 #[repr(C)]
2110 #[derive(Copy, Clone)]
2111 pub union fx_layout__bindgen_ty_1 {
2112     pub __bindgen_anon_1: fx_layout__bindgen_ty_1__bindgen_ty_1,
2113     pub fpu_ip: u64,
2114 }
2115 #[repr(C)]
2116 #[derive(Debug, Default, Copy, Clone)]
2117 pub struct fx_layout__bindgen_ty_1__bindgen_ty_1 {
2118     pub fip: u32,
2119     pub fcs: u16,
2120     pub res2: u16,
2121 }
2122 #[test]
bindgen_test_layout_fx_layout__bindgen_ty_1__bindgen_ty_1()2123 fn bindgen_test_layout_fx_layout__bindgen_ty_1__bindgen_ty_1() {
2124     const UNINIT: ::std::mem::MaybeUninit<fx_layout__bindgen_ty_1__bindgen_ty_1> =
2125         ::std::mem::MaybeUninit::uninit();
2126     let ptr = UNINIT.as_ptr();
2127     assert_eq!(
2128         ::std::mem::size_of::<fx_layout__bindgen_ty_1__bindgen_ty_1>(),
2129         8usize,
2130         concat!(
2131             "Size of: ",
2132             stringify!(fx_layout__bindgen_ty_1__bindgen_ty_1)
2133         )
2134     );
2135     assert_eq!(
2136         ::std::mem::align_of::<fx_layout__bindgen_ty_1__bindgen_ty_1>(),
2137         4usize,
2138         concat!(
2139             "Alignment of ",
2140             stringify!(fx_layout__bindgen_ty_1__bindgen_ty_1)
2141         )
2142     );
2143     assert_eq!(
2144         unsafe { ::std::ptr::addr_of!((*ptr).fip) as usize - ptr as usize },
2145         0usize,
2146         concat!(
2147             "Offset of field: ",
2148             stringify!(fx_layout__bindgen_ty_1__bindgen_ty_1),
2149             "::",
2150             stringify!(fip)
2151         )
2152     );
2153     assert_eq!(
2154         unsafe { ::std::ptr::addr_of!((*ptr).fcs) as usize - ptr as usize },
2155         4usize,
2156         concat!(
2157             "Offset of field: ",
2158             stringify!(fx_layout__bindgen_ty_1__bindgen_ty_1),
2159             "::",
2160             stringify!(fcs)
2161         )
2162     );
2163     assert_eq!(
2164         unsafe { ::std::ptr::addr_of!((*ptr).res2) as usize - ptr as usize },
2165         6usize,
2166         concat!(
2167             "Offset of field: ",
2168             stringify!(fx_layout__bindgen_ty_1__bindgen_ty_1),
2169             "::",
2170             stringify!(res2)
2171         )
2172     );
2173 }
2174 #[test]
bindgen_test_layout_fx_layout__bindgen_ty_1()2175 fn bindgen_test_layout_fx_layout__bindgen_ty_1() {
2176     const UNINIT: ::std::mem::MaybeUninit<fx_layout__bindgen_ty_1> =
2177         ::std::mem::MaybeUninit::uninit();
2178     let ptr = UNINIT.as_ptr();
2179     assert_eq!(
2180         ::std::mem::size_of::<fx_layout__bindgen_ty_1>(),
2181         8usize,
2182         concat!("Size of: ", stringify!(fx_layout__bindgen_ty_1))
2183     );
2184     assert_eq!(
2185         ::std::mem::align_of::<fx_layout__bindgen_ty_1>(),
2186         8usize,
2187         concat!("Alignment of ", stringify!(fx_layout__bindgen_ty_1))
2188     );
2189     assert_eq!(
2190         unsafe { ::std::ptr::addr_of!((*ptr).fpu_ip) as usize - ptr as usize },
2191         0usize,
2192         concat!(
2193             "Offset of field: ",
2194             stringify!(fx_layout__bindgen_ty_1),
2195             "::",
2196             stringify!(fpu_ip)
2197         )
2198     );
2199 }
2200 impl Default for fx_layout__bindgen_ty_1 {
default() -> Self2201     fn default() -> Self {
2202         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2203         unsafe {
2204             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2205             s.assume_init()
2206         }
2207     }
2208 }
2209 #[repr(C)]
2210 #[derive(Copy, Clone)]
2211 pub union fx_layout__bindgen_ty_2 {
2212     pub __bindgen_anon_1: fx_layout__bindgen_ty_2__bindgen_ty_1,
2213     pub fpu_dp: u64,
2214 }
2215 #[repr(C)]
2216 #[derive(Debug, Default, Copy, Clone)]
2217 pub struct fx_layout__bindgen_ty_2__bindgen_ty_1 {
2218     pub fdp: u32,
2219     pub fds: u16,
2220     pub res3: u16,
2221 }
2222 #[test]
bindgen_test_layout_fx_layout__bindgen_ty_2__bindgen_ty_1()2223 fn bindgen_test_layout_fx_layout__bindgen_ty_2__bindgen_ty_1() {
2224     const UNINIT: ::std::mem::MaybeUninit<fx_layout__bindgen_ty_2__bindgen_ty_1> =
2225         ::std::mem::MaybeUninit::uninit();
2226     let ptr = UNINIT.as_ptr();
2227     assert_eq!(
2228         ::std::mem::size_of::<fx_layout__bindgen_ty_2__bindgen_ty_1>(),
2229         8usize,
2230         concat!(
2231             "Size of: ",
2232             stringify!(fx_layout__bindgen_ty_2__bindgen_ty_1)
2233         )
2234     );
2235     assert_eq!(
2236         ::std::mem::align_of::<fx_layout__bindgen_ty_2__bindgen_ty_1>(),
2237         4usize,
2238         concat!(
2239             "Alignment of ",
2240             stringify!(fx_layout__bindgen_ty_2__bindgen_ty_1)
2241         )
2242     );
2243     assert_eq!(
2244         unsafe { ::std::ptr::addr_of!((*ptr).fdp) as usize - ptr as usize },
2245         0usize,
2246         concat!(
2247             "Offset of field: ",
2248             stringify!(fx_layout__bindgen_ty_2__bindgen_ty_1),
2249             "::",
2250             stringify!(fdp)
2251         )
2252     );
2253     assert_eq!(
2254         unsafe { ::std::ptr::addr_of!((*ptr).fds) as usize - ptr as usize },
2255         4usize,
2256         concat!(
2257             "Offset of field: ",
2258             stringify!(fx_layout__bindgen_ty_2__bindgen_ty_1),
2259             "::",
2260             stringify!(fds)
2261         )
2262     );
2263     assert_eq!(
2264         unsafe { ::std::ptr::addr_of!((*ptr).res3) as usize - ptr as usize },
2265         6usize,
2266         concat!(
2267             "Offset of field: ",
2268             stringify!(fx_layout__bindgen_ty_2__bindgen_ty_1),
2269             "::",
2270             stringify!(res3)
2271         )
2272     );
2273 }
2274 #[test]
bindgen_test_layout_fx_layout__bindgen_ty_2()2275 fn bindgen_test_layout_fx_layout__bindgen_ty_2() {
2276     const UNINIT: ::std::mem::MaybeUninit<fx_layout__bindgen_ty_2> =
2277         ::std::mem::MaybeUninit::uninit();
2278     let ptr = UNINIT.as_ptr();
2279     assert_eq!(
2280         ::std::mem::size_of::<fx_layout__bindgen_ty_2>(),
2281         8usize,
2282         concat!("Size of: ", stringify!(fx_layout__bindgen_ty_2))
2283     );
2284     assert_eq!(
2285         ::std::mem::align_of::<fx_layout__bindgen_ty_2>(),
2286         8usize,
2287         concat!("Alignment of ", stringify!(fx_layout__bindgen_ty_2))
2288     );
2289     assert_eq!(
2290         unsafe { ::std::ptr::addr_of!((*ptr).fpu_dp) as usize - ptr as usize },
2291         0usize,
2292         concat!(
2293             "Offset of field: ",
2294             stringify!(fx_layout__bindgen_ty_2),
2295             "::",
2296             stringify!(fpu_dp)
2297         )
2298     );
2299 }
2300 impl Default for fx_layout__bindgen_ty_2 {
default() -> Self2301     fn default() -> Self {
2302         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2303         unsafe {
2304             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2305             s.assume_init()
2306         }
2307     }
2308 }
2309 #[test]
bindgen_test_layout_fx_layout()2310 fn bindgen_test_layout_fx_layout() {
2311     const UNINIT: ::std::mem::MaybeUninit<fx_layout> = ::std::mem::MaybeUninit::uninit();
2312     let ptr = UNINIT.as_ptr();
2313     assert_eq!(
2314         ::std::mem::size_of::<fx_layout>(),
2315         512usize,
2316         concat!("Size of: ", stringify!(fx_layout))
2317     );
2318     assert_eq!(
2319         ::std::mem::align_of::<fx_layout>(),
2320         16usize,
2321         concat!("Alignment of ", stringify!(fx_layout))
2322     );
2323     assert_eq!(
2324         unsafe { ::std::ptr::addr_of!((*ptr).fcw) as usize - ptr as usize },
2325         0usize,
2326         concat!(
2327             "Offset of field: ",
2328             stringify!(fx_layout),
2329             "::",
2330             stringify!(fcw)
2331         )
2332     );
2333     assert_eq!(
2334         unsafe { ::std::ptr::addr_of!((*ptr).fsw) as usize - ptr as usize },
2335         2usize,
2336         concat!(
2337             "Offset of field: ",
2338             stringify!(fx_layout),
2339             "::",
2340             stringify!(fsw)
2341         )
2342     );
2343     assert_eq!(
2344         unsafe { ::std::ptr::addr_of!((*ptr).ftw) as usize - ptr as usize },
2345         4usize,
2346         concat!(
2347             "Offset of field: ",
2348             stringify!(fx_layout),
2349             "::",
2350             stringify!(ftw)
2351         )
2352     );
2353     assert_eq!(
2354         unsafe { ::std::ptr::addr_of!((*ptr).res1) as usize - ptr as usize },
2355         5usize,
2356         concat!(
2357             "Offset of field: ",
2358             stringify!(fx_layout),
2359             "::",
2360             stringify!(res1)
2361         )
2362     );
2363     assert_eq!(
2364         unsafe { ::std::ptr::addr_of!((*ptr).fop) as usize - ptr as usize },
2365         6usize,
2366         concat!(
2367             "Offset of field: ",
2368             stringify!(fx_layout),
2369             "::",
2370             stringify!(fop)
2371         )
2372     );
2373     assert_eq!(
2374         unsafe { ::std::ptr::addr_of!((*ptr).mxcsr) as usize - ptr as usize },
2375         24usize,
2376         concat!(
2377             "Offset of field: ",
2378             stringify!(fx_layout),
2379             "::",
2380             stringify!(mxcsr)
2381         )
2382     );
2383     assert_eq!(
2384         unsafe { ::std::ptr::addr_of!((*ptr).mxcsr_mask) as usize - ptr as usize },
2385         28usize,
2386         concat!(
2387             "Offset of field: ",
2388             stringify!(fx_layout),
2389             "::",
2390             stringify!(mxcsr_mask)
2391         )
2392     );
2393     assert_eq!(
2394         unsafe { ::std::ptr::addr_of!((*ptr).st_mm) as usize - ptr as usize },
2395         32usize,
2396         concat!(
2397             "Offset of field: ",
2398             stringify!(fx_layout),
2399             "::",
2400             stringify!(st_mm)
2401         )
2402     );
2403     assert_eq!(
2404         unsafe { ::std::ptr::addr_of!((*ptr).mmx_1) as usize - ptr as usize },
2405         160usize,
2406         concat!(
2407             "Offset of field: ",
2408             stringify!(fx_layout),
2409             "::",
2410             stringify!(mmx_1)
2411         )
2412     );
2413     assert_eq!(
2414         unsafe { ::std::ptr::addr_of!((*ptr).mmx_2) as usize - ptr as usize },
2415         288usize,
2416         concat!(
2417             "Offset of field: ",
2418             stringify!(fx_layout),
2419             "::",
2420             stringify!(mmx_2)
2421         )
2422     );
2423     assert_eq!(
2424         unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize },
2425         416usize,
2426         concat!(
2427             "Offset of field: ",
2428             stringify!(fx_layout),
2429             "::",
2430             stringify!(pad)
2431         )
2432     );
2433 }
2434 impl Default for fx_layout {
default() -> Self2435     fn default() -> Self {
2436         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2437         unsafe {
2438             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2439             s.assume_init()
2440         }
2441     }
2442 }
2443 #[repr(C, packed)]
2444 #[derive(Debug, Default, Copy, Clone)]
2445 pub struct hax_msr_data {
2446     pub nr_msr: u16,
2447     pub done: u16,
2448     pub pad: [u16; 2usize],
2449     pub entries: [vmx_msr; 32usize],
2450 }
2451 #[test]
bindgen_test_layout_hax_msr_data()2452 fn bindgen_test_layout_hax_msr_data() {
2453     const UNINIT: ::std::mem::MaybeUninit<hax_msr_data> = ::std::mem::MaybeUninit::uninit();
2454     let ptr = UNINIT.as_ptr();
2455     assert_eq!(
2456         ::std::mem::size_of::<hax_msr_data>(),
2457         520usize,
2458         concat!("Size of: ", stringify!(hax_msr_data))
2459     );
2460     assert_eq!(
2461         ::std::mem::align_of::<hax_msr_data>(),
2462         1usize,
2463         concat!("Alignment of ", stringify!(hax_msr_data))
2464     );
2465     assert_eq!(
2466         unsafe { ::std::ptr::addr_of!((*ptr).nr_msr) as usize - ptr as usize },
2467         0usize,
2468         concat!(
2469             "Offset of field: ",
2470             stringify!(hax_msr_data),
2471             "::",
2472             stringify!(nr_msr)
2473         )
2474     );
2475     assert_eq!(
2476         unsafe { ::std::ptr::addr_of!((*ptr).done) as usize - ptr as usize },
2477         2usize,
2478         concat!(
2479             "Offset of field: ",
2480             stringify!(hax_msr_data),
2481             "::",
2482             stringify!(done)
2483         )
2484     );
2485     assert_eq!(
2486         unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize },
2487         4usize,
2488         concat!(
2489             "Offset of field: ",
2490             stringify!(hax_msr_data),
2491             "::",
2492             stringify!(pad)
2493         )
2494     );
2495     assert_eq!(
2496         unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize },
2497         8usize,
2498         concat!(
2499             "Offset of field: ",
2500             stringify!(hax_msr_data),
2501             "::",
2502             stringify!(entries)
2503         )
2504     );
2505 }
2506 #[repr(C, packed)]
2507 #[derive(Copy, Clone)]
2508 pub struct hax_tunnel {
2509     pub _exit_reason: u32,
2510     pub pad0: u32,
2511     pub _exit_status: u32,
2512     pub user_event_pending: u32,
2513     pub ready_for_interrupt_injection: ::std::os::raw::c_int,
2514     pub request_interrupt_window: ::std::os::raw::c_int,
2515     pub __bindgen_anon_1: hax_tunnel__bindgen_ty_1,
2516     pub apic_base: u64,
2517 }
2518 #[repr(C)]
2519 #[derive(Copy, Clone)]
2520 pub union hax_tunnel__bindgen_ty_1 {
2521     pub io: hax_tunnel__bindgen_ty_1__bindgen_ty_1,
2522     pub mmio: hax_tunnel__bindgen_ty_1__bindgen_ty_2,
2523     pub pagefault: hax_tunnel__bindgen_ty_1__bindgen_ty_3,
2524     pub state: hax_tunnel__bindgen_ty_1__bindgen_ty_4,
2525     pub debug: hax_tunnel__bindgen_ty_1__bindgen_ty_5,
2526 }
2527 #[repr(C)]
2528 #[derive(Debug, Default, Copy, Clone)]
2529 pub struct hax_tunnel__bindgen_ty_1__bindgen_ty_1 {
2530     pub _direction: u8,
2531     pub _df: u8,
2532     pub _size: u16,
2533     pub _port: u16,
2534     pub _count: u16,
2535     pub _flags: u8,
2536     pub _pad0: u8,
2537     pub _pad1: u16,
2538     pub _pad2: u32,
2539     pub _vaddr: hax_vaddr_t,
2540 }
2541 #[test]
bindgen_test_layout_hax_tunnel__bindgen_ty_1__bindgen_ty_1()2542 fn bindgen_test_layout_hax_tunnel__bindgen_ty_1__bindgen_ty_1() {
2543     const UNINIT: ::std::mem::MaybeUninit<hax_tunnel__bindgen_ty_1__bindgen_ty_1> =
2544         ::std::mem::MaybeUninit::uninit();
2545     let ptr = UNINIT.as_ptr();
2546     assert_eq!(
2547         ::std::mem::size_of::<hax_tunnel__bindgen_ty_1__bindgen_ty_1>(),
2548         24usize,
2549         concat!(
2550             "Size of: ",
2551             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1)
2552         )
2553     );
2554     assert_eq!(
2555         ::std::mem::align_of::<hax_tunnel__bindgen_ty_1__bindgen_ty_1>(),
2556         8usize,
2557         concat!(
2558             "Alignment of ",
2559             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1)
2560         )
2561     );
2562     assert_eq!(
2563         unsafe { ::std::ptr::addr_of!((*ptr)._direction) as usize - ptr as usize },
2564         0usize,
2565         concat!(
2566             "Offset of field: ",
2567             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1),
2568             "::",
2569             stringify!(_direction)
2570         )
2571     );
2572     assert_eq!(
2573         unsafe { ::std::ptr::addr_of!((*ptr)._df) as usize - ptr as usize },
2574         1usize,
2575         concat!(
2576             "Offset of field: ",
2577             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1),
2578             "::",
2579             stringify!(_df)
2580         )
2581     );
2582     assert_eq!(
2583         unsafe { ::std::ptr::addr_of!((*ptr)._size) as usize - ptr as usize },
2584         2usize,
2585         concat!(
2586             "Offset of field: ",
2587             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1),
2588             "::",
2589             stringify!(_size)
2590         )
2591     );
2592     assert_eq!(
2593         unsafe { ::std::ptr::addr_of!((*ptr)._port) as usize - ptr as usize },
2594         4usize,
2595         concat!(
2596             "Offset of field: ",
2597             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1),
2598             "::",
2599             stringify!(_port)
2600         )
2601     );
2602     assert_eq!(
2603         unsafe { ::std::ptr::addr_of!((*ptr)._count) as usize - ptr as usize },
2604         6usize,
2605         concat!(
2606             "Offset of field: ",
2607             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1),
2608             "::",
2609             stringify!(_count)
2610         )
2611     );
2612     assert_eq!(
2613         unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize },
2614         8usize,
2615         concat!(
2616             "Offset of field: ",
2617             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1),
2618             "::",
2619             stringify!(_flags)
2620         )
2621     );
2622     assert_eq!(
2623         unsafe { ::std::ptr::addr_of!((*ptr)._pad0) as usize - ptr as usize },
2624         9usize,
2625         concat!(
2626             "Offset of field: ",
2627             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1),
2628             "::",
2629             stringify!(_pad0)
2630         )
2631     );
2632     assert_eq!(
2633         unsafe { ::std::ptr::addr_of!((*ptr)._pad1) as usize - ptr as usize },
2634         10usize,
2635         concat!(
2636             "Offset of field: ",
2637             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1),
2638             "::",
2639             stringify!(_pad1)
2640         )
2641     );
2642     assert_eq!(
2643         unsafe { ::std::ptr::addr_of!((*ptr)._pad2) as usize - ptr as usize },
2644         12usize,
2645         concat!(
2646             "Offset of field: ",
2647             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1),
2648             "::",
2649             stringify!(_pad2)
2650         )
2651     );
2652     assert_eq!(
2653         unsafe { ::std::ptr::addr_of!((*ptr)._vaddr) as usize - ptr as usize },
2654         16usize,
2655         concat!(
2656             "Offset of field: ",
2657             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_1),
2658             "::",
2659             stringify!(_vaddr)
2660         )
2661     );
2662 }
2663 #[repr(C)]
2664 #[derive(Debug, Default, Copy, Clone)]
2665 pub struct hax_tunnel__bindgen_ty_1__bindgen_ty_2 {
2666     pub gla: hax_paddr_t,
2667 }
2668 #[test]
bindgen_test_layout_hax_tunnel__bindgen_ty_1__bindgen_ty_2()2669 fn bindgen_test_layout_hax_tunnel__bindgen_ty_1__bindgen_ty_2() {
2670     const UNINIT: ::std::mem::MaybeUninit<hax_tunnel__bindgen_ty_1__bindgen_ty_2> =
2671         ::std::mem::MaybeUninit::uninit();
2672     let ptr = UNINIT.as_ptr();
2673     assert_eq!(
2674         ::std::mem::size_of::<hax_tunnel__bindgen_ty_1__bindgen_ty_2>(),
2675         8usize,
2676         concat!(
2677             "Size of: ",
2678             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_2)
2679         )
2680     );
2681     assert_eq!(
2682         ::std::mem::align_of::<hax_tunnel__bindgen_ty_1__bindgen_ty_2>(),
2683         8usize,
2684         concat!(
2685             "Alignment of ",
2686             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_2)
2687         )
2688     );
2689     assert_eq!(
2690         unsafe { ::std::ptr::addr_of!((*ptr).gla) as usize - ptr as usize },
2691         0usize,
2692         concat!(
2693             "Offset of field: ",
2694             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_2),
2695             "::",
2696             stringify!(gla)
2697         )
2698     );
2699 }
2700 #[repr(C)]
2701 #[derive(Debug, Default, Copy, Clone)]
2702 pub struct hax_tunnel__bindgen_ty_1__bindgen_ty_3 {
2703     pub gpa: hax_paddr_t,
2704     pub flags: u32,
2705     pub reserved1: u32,
2706     pub reserved2: u64,
2707 }
2708 #[test]
bindgen_test_layout_hax_tunnel__bindgen_ty_1__bindgen_ty_3()2709 fn bindgen_test_layout_hax_tunnel__bindgen_ty_1__bindgen_ty_3() {
2710     const UNINIT: ::std::mem::MaybeUninit<hax_tunnel__bindgen_ty_1__bindgen_ty_3> =
2711         ::std::mem::MaybeUninit::uninit();
2712     let ptr = UNINIT.as_ptr();
2713     assert_eq!(
2714         ::std::mem::size_of::<hax_tunnel__bindgen_ty_1__bindgen_ty_3>(),
2715         24usize,
2716         concat!(
2717             "Size of: ",
2718             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_3)
2719         )
2720     );
2721     assert_eq!(
2722         ::std::mem::align_of::<hax_tunnel__bindgen_ty_1__bindgen_ty_3>(),
2723         8usize,
2724         concat!(
2725             "Alignment of ",
2726             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_3)
2727         )
2728     );
2729     assert_eq!(
2730         unsafe { ::std::ptr::addr_of!((*ptr).gpa) as usize - ptr as usize },
2731         0usize,
2732         concat!(
2733             "Offset of field: ",
2734             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_3),
2735             "::",
2736             stringify!(gpa)
2737         )
2738     );
2739     assert_eq!(
2740         unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
2741         8usize,
2742         concat!(
2743             "Offset of field: ",
2744             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_3),
2745             "::",
2746             stringify!(flags)
2747         )
2748     );
2749     assert_eq!(
2750         unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize },
2751         12usize,
2752         concat!(
2753             "Offset of field: ",
2754             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_3),
2755             "::",
2756             stringify!(reserved1)
2757         )
2758     );
2759     assert_eq!(
2760         unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize },
2761         16usize,
2762         concat!(
2763             "Offset of field: ",
2764             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_3),
2765             "::",
2766             stringify!(reserved2)
2767         )
2768     );
2769 }
2770 #[repr(C)]
2771 #[derive(Debug, Default, Copy, Clone)]
2772 pub struct hax_tunnel__bindgen_ty_1__bindgen_ty_4 {
2773     pub dummy: hax_paddr_t,
2774 }
2775 #[test]
bindgen_test_layout_hax_tunnel__bindgen_ty_1__bindgen_ty_4()2776 fn bindgen_test_layout_hax_tunnel__bindgen_ty_1__bindgen_ty_4() {
2777     const UNINIT: ::std::mem::MaybeUninit<hax_tunnel__bindgen_ty_1__bindgen_ty_4> =
2778         ::std::mem::MaybeUninit::uninit();
2779     let ptr = UNINIT.as_ptr();
2780     assert_eq!(
2781         ::std::mem::size_of::<hax_tunnel__bindgen_ty_1__bindgen_ty_4>(),
2782         8usize,
2783         concat!(
2784             "Size of: ",
2785             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_4)
2786         )
2787     );
2788     assert_eq!(
2789         ::std::mem::align_of::<hax_tunnel__bindgen_ty_1__bindgen_ty_4>(),
2790         8usize,
2791         concat!(
2792             "Alignment of ",
2793             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_4)
2794         )
2795     );
2796     assert_eq!(
2797         unsafe { ::std::ptr::addr_of!((*ptr).dummy) as usize - ptr as usize },
2798         0usize,
2799         concat!(
2800             "Offset of field: ",
2801             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_4),
2802             "::",
2803             stringify!(dummy)
2804         )
2805     );
2806 }
2807 #[repr(C)]
2808 #[derive(Debug, Default, Copy, Clone)]
2809 pub struct hax_tunnel__bindgen_ty_1__bindgen_ty_5 {
2810     pub rip: u64,
2811     pub dr6: u64,
2812     pub dr7: u64,
2813 }
2814 #[test]
bindgen_test_layout_hax_tunnel__bindgen_ty_1__bindgen_ty_5()2815 fn bindgen_test_layout_hax_tunnel__bindgen_ty_1__bindgen_ty_5() {
2816     const UNINIT: ::std::mem::MaybeUninit<hax_tunnel__bindgen_ty_1__bindgen_ty_5> =
2817         ::std::mem::MaybeUninit::uninit();
2818     let ptr = UNINIT.as_ptr();
2819     assert_eq!(
2820         ::std::mem::size_of::<hax_tunnel__bindgen_ty_1__bindgen_ty_5>(),
2821         24usize,
2822         concat!(
2823             "Size of: ",
2824             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_5)
2825         )
2826     );
2827     assert_eq!(
2828         ::std::mem::align_of::<hax_tunnel__bindgen_ty_1__bindgen_ty_5>(),
2829         8usize,
2830         concat!(
2831             "Alignment of ",
2832             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_5)
2833         )
2834     );
2835     assert_eq!(
2836         unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize },
2837         0usize,
2838         concat!(
2839             "Offset of field: ",
2840             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_5),
2841             "::",
2842             stringify!(rip)
2843         )
2844     );
2845     assert_eq!(
2846         unsafe { ::std::ptr::addr_of!((*ptr).dr6) as usize - ptr as usize },
2847         8usize,
2848         concat!(
2849             "Offset of field: ",
2850             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_5),
2851             "::",
2852             stringify!(dr6)
2853         )
2854     );
2855     assert_eq!(
2856         unsafe { ::std::ptr::addr_of!((*ptr).dr7) as usize - ptr as usize },
2857         16usize,
2858         concat!(
2859             "Offset of field: ",
2860             stringify!(hax_tunnel__bindgen_ty_1__bindgen_ty_5),
2861             "::",
2862             stringify!(dr7)
2863         )
2864     );
2865 }
2866 #[test]
bindgen_test_layout_hax_tunnel__bindgen_ty_1()2867 fn bindgen_test_layout_hax_tunnel__bindgen_ty_1() {
2868     const UNINIT: ::std::mem::MaybeUninit<hax_tunnel__bindgen_ty_1> =
2869         ::std::mem::MaybeUninit::uninit();
2870     let ptr = UNINIT.as_ptr();
2871     assert_eq!(
2872         ::std::mem::size_of::<hax_tunnel__bindgen_ty_1>(),
2873         24usize,
2874         concat!("Size of: ", stringify!(hax_tunnel__bindgen_ty_1))
2875     );
2876     assert_eq!(
2877         ::std::mem::align_of::<hax_tunnel__bindgen_ty_1>(),
2878         8usize,
2879         concat!("Alignment of ", stringify!(hax_tunnel__bindgen_ty_1))
2880     );
2881     assert_eq!(
2882         unsafe { ::std::ptr::addr_of!((*ptr).io) as usize - ptr as usize },
2883         0usize,
2884         concat!(
2885             "Offset of field: ",
2886             stringify!(hax_tunnel__bindgen_ty_1),
2887             "::",
2888             stringify!(io)
2889         )
2890     );
2891     assert_eq!(
2892         unsafe { ::std::ptr::addr_of!((*ptr).mmio) as usize - ptr as usize },
2893         0usize,
2894         concat!(
2895             "Offset of field: ",
2896             stringify!(hax_tunnel__bindgen_ty_1),
2897             "::",
2898             stringify!(mmio)
2899         )
2900     );
2901     assert_eq!(
2902         unsafe { ::std::ptr::addr_of!((*ptr).pagefault) as usize - ptr as usize },
2903         0usize,
2904         concat!(
2905             "Offset of field: ",
2906             stringify!(hax_tunnel__bindgen_ty_1),
2907             "::",
2908             stringify!(pagefault)
2909         )
2910     );
2911     assert_eq!(
2912         unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
2913         0usize,
2914         concat!(
2915             "Offset of field: ",
2916             stringify!(hax_tunnel__bindgen_ty_1),
2917             "::",
2918             stringify!(state)
2919         )
2920     );
2921     assert_eq!(
2922         unsafe { ::std::ptr::addr_of!((*ptr).debug) as usize - ptr as usize },
2923         0usize,
2924         concat!(
2925             "Offset of field: ",
2926             stringify!(hax_tunnel__bindgen_ty_1),
2927             "::",
2928             stringify!(debug)
2929         )
2930     );
2931 }
2932 impl Default for hax_tunnel__bindgen_ty_1 {
default() -> Self2933     fn default() -> Self {
2934         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2935         unsafe {
2936             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2937             s.assume_init()
2938         }
2939     }
2940 }
2941 #[test]
bindgen_test_layout_hax_tunnel()2942 fn bindgen_test_layout_hax_tunnel() {
2943     const UNINIT: ::std::mem::MaybeUninit<hax_tunnel> = ::std::mem::MaybeUninit::uninit();
2944     let ptr = UNINIT.as_ptr();
2945     assert_eq!(
2946         ::std::mem::size_of::<hax_tunnel>(),
2947         56usize,
2948         concat!("Size of: ", stringify!(hax_tunnel))
2949     );
2950     assert_eq!(
2951         ::std::mem::align_of::<hax_tunnel>(),
2952         1usize,
2953         concat!("Alignment of ", stringify!(hax_tunnel))
2954     );
2955     assert_eq!(
2956         unsafe { ::std::ptr::addr_of!((*ptr)._exit_reason) as usize - ptr as usize },
2957         0usize,
2958         concat!(
2959             "Offset of field: ",
2960             stringify!(hax_tunnel),
2961             "::",
2962             stringify!(_exit_reason)
2963         )
2964     );
2965     assert_eq!(
2966         unsafe { ::std::ptr::addr_of!((*ptr).pad0) as usize - ptr as usize },
2967         4usize,
2968         concat!(
2969             "Offset of field: ",
2970             stringify!(hax_tunnel),
2971             "::",
2972             stringify!(pad0)
2973         )
2974     );
2975     assert_eq!(
2976         unsafe { ::std::ptr::addr_of!((*ptr)._exit_status) as usize - ptr as usize },
2977         8usize,
2978         concat!(
2979             "Offset of field: ",
2980             stringify!(hax_tunnel),
2981             "::",
2982             stringify!(_exit_status)
2983         )
2984     );
2985     assert_eq!(
2986         unsafe { ::std::ptr::addr_of!((*ptr).user_event_pending) as usize - ptr as usize },
2987         12usize,
2988         concat!(
2989             "Offset of field: ",
2990             stringify!(hax_tunnel),
2991             "::",
2992             stringify!(user_event_pending)
2993         )
2994     );
2995     assert_eq!(
2996         unsafe {
2997             ::std::ptr::addr_of!((*ptr).ready_for_interrupt_injection) as usize - ptr as usize
2998         },
2999         16usize,
3000         concat!(
3001             "Offset of field: ",
3002             stringify!(hax_tunnel),
3003             "::",
3004             stringify!(ready_for_interrupt_injection)
3005         )
3006     );
3007     assert_eq!(
3008         unsafe { ::std::ptr::addr_of!((*ptr).request_interrupt_window) as usize - ptr as usize },
3009         20usize,
3010         concat!(
3011             "Offset of field: ",
3012             stringify!(hax_tunnel),
3013             "::",
3014             stringify!(request_interrupt_window)
3015         )
3016     );
3017     assert_eq!(
3018         unsafe { ::std::ptr::addr_of!((*ptr).apic_base) as usize - ptr as usize },
3019         48usize,
3020         concat!(
3021             "Offset of field: ",
3022             stringify!(hax_tunnel),
3023             "::",
3024             stringify!(apic_base)
3025         )
3026     );
3027 }
3028 impl Default for hax_tunnel {
default() -> Self3029     fn default() -> Self {
3030         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3031         unsafe {
3032             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3033             s.assume_init()
3034         }
3035     }
3036 }
3037 #[repr(C, packed)]
3038 #[derive(Copy, Clone)]
3039 pub struct hax_fastmmio {
3040     pub gpa: hax_paddr_t,
3041     pub __bindgen_anon_1: hax_fastmmio__bindgen_ty_1,
3042     pub size: u8,
3043     pub direction: u8,
3044     pub reg_index: u16,
3045     pub pad0: u32,
3046     pub _cr0: u64,
3047     pub _cr2: u64,
3048     pub _cr3: u64,
3049     pub _cr4: u64,
3050 }
3051 #[repr(C)]
3052 #[derive(Copy, Clone)]
3053 pub union hax_fastmmio__bindgen_ty_1 {
3054     pub value: u64,
3055     pub gpa2: hax_paddr_t,
3056 }
3057 #[test]
bindgen_test_layout_hax_fastmmio__bindgen_ty_1()3058 fn bindgen_test_layout_hax_fastmmio__bindgen_ty_1() {
3059     const UNINIT: ::std::mem::MaybeUninit<hax_fastmmio__bindgen_ty_1> =
3060         ::std::mem::MaybeUninit::uninit();
3061     let ptr = UNINIT.as_ptr();
3062     assert_eq!(
3063         ::std::mem::size_of::<hax_fastmmio__bindgen_ty_1>(),
3064         8usize,
3065         concat!("Size of: ", stringify!(hax_fastmmio__bindgen_ty_1))
3066     );
3067     assert_eq!(
3068         ::std::mem::align_of::<hax_fastmmio__bindgen_ty_1>(),
3069         8usize,
3070         concat!("Alignment of ", stringify!(hax_fastmmio__bindgen_ty_1))
3071     );
3072     assert_eq!(
3073         unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
3074         0usize,
3075         concat!(
3076             "Offset of field: ",
3077             stringify!(hax_fastmmio__bindgen_ty_1),
3078             "::",
3079             stringify!(value)
3080         )
3081     );
3082     assert_eq!(
3083         unsafe { ::std::ptr::addr_of!((*ptr).gpa2) as usize - ptr as usize },
3084         0usize,
3085         concat!(
3086             "Offset of field: ",
3087             stringify!(hax_fastmmio__bindgen_ty_1),
3088             "::",
3089             stringify!(gpa2)
3090         )
3091     );
3092 }
3093 impl Default for hax_fastmmio__bindgen_ty_1 {
default() -> Self3094     fn default() -> Self {
3095         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3096         unsafe {
3097             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3098             s.assume_init()
3099         }
3100     }
3101 }
3102 #[test]
bindgen_test_layout_hax_fastmmio()3103 fn bindgen_test_layout_hax_fastmmio() {
3104     const UNINIT: ::std::mem::MaybeUninit<hax_fastmmio> = ::std::mem::MaybeUninit::uninit();
3105     let ptr = UNINIT.as_ptr();
3106     assert_eq!(
3107         ::std::mem::size_of::<hax_fastmmio>(),
3108         56usize,
3109         concat!("Size of: ", stringify!(hax_fastmmio))
3110     );
3111     assert_eq!(
3112         ::std::mem::align_of::<hax_fastmmio>(),
3113         1usize,
3114         concat!("Alignment of ", stringify!(hax_fastmmio))
3115     );
3116     assert_eq!(
3117         unsafe { ::std::ptr::addr_of!((*ptr).gpa) as usize - ptr as usize },
3118         0usize,
3119         concat!(
3120             "Offset of field: ",
3121             stringify!(hax_fastmmio),
3122             "::",
3123             stringify!(gpa)
3124         )
3125     );
3126     assert_eq!(
3127         unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
3128         16usize,
3129         concat!(
3130             "Offset of field: ",
3131             stringify!(hax_fastmmio),
3132             "::",
3133             stringify!(size)
3134         )
3135     );
3136     assert_eq!(
3137         unsafe { ::std::ptr::addr_of!((*ptr).direction) as usize - ptr as usize },
3138         17usize,
3139         concat!(
3140             "Offset of field: ",
3141             stringify!(hax_fastmmio),
3142             "::",
3143             stringify!(direction)
3144         )
3145     );
3146     assert_eq!(
3147         unsafe { ::std::ptr::addr_of!((*ptr).reg_index) as usize - ptr as usize },
3148         18usize,
3149         concat!(
3150             "Offset of field: ",
3151             stringify!(hax_fastmmio),
3152             "::",
3153             stringify!(reg_index)
3154         )
3155     );
3156     assert_eq!(
3157         unsafe { ::std::ptr::addr_of!((*ptr).pad0) as usize - ptr as usize },
3158         20usize,
3159         concat!(
3160             "Offset of field: ",
3161             stringify!(hax_fastmmio),
3162             "::",
3163             stringify!(pad0)
3164         )
3165     );
3166     assert_eq!(
3167         unsafe { ::std::ptr::addr_of!((*ptr)._cr0) as usize - ptr as usize },
3168         24usize,
3169         concat!(
3170             "Offset of field: ",
3171             stringify!(hax_fastmmio),
3172             "::",
3173             stringify!(_cr0)
3174         )
3175     );
3176     assert_eq!(
3177         unsafe { ::std::ptr::addr_of!((*ptr)._cr2) as usize - ptr as usize },
3178         32usize,
3179         concat!(
3180             "Offset of field: ",
3181             stringify!(hax_fastmmio),
3182             "::",
3183             stringify!(_cr2)
3184         )
3185     );
3186     assert_eq!(
3187         unsafe { ::std::ptr::addr_of!((*ptr)._cr3) as usize - ptr as usize },
3188         40usize,
3189         concat!(
3190             "Offset of field: ",
3191             stringify!(hax_fastmmio),
3192             "::",
3193             stringify!(_cr3)
3194         )
3195     );
3196     assert_eq!(
3197         unsafe { ::std::ptr::addr_of!((*ptr)._cr4) as usize - ptr as usize },
3198         48usize,
3199         concat!(
3200             "Offset of field: ",
3201             stringify!(hax_fastmmio),
3202             "::",
3203             stringify!(_cr4)
3204         )
3205     );
3206 }
3207 impl Default for hax_fastmmio {
default() -> Self3208     fn default() -> Self {
3209         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3210         unsafe {
3211             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3212             s.assume_init()
3213         }
3214     }
3215 }
3216 #[repr(C, packed)]
3217 #[derive(Debug, Default, Copy, Clone)]
3218 pub struct hax_module_version {
3219     pub compat_version: u32,
3220     pub cur_version: u32,
3221 }
3222 #[test]
bindgen_test_layout_hax_module_version()3223 fn bindgen_test_layout_hax_module_version() {
3224     const UNINIT: ::std::mem::MaybeUninit<hax_module_version> = ::std::mem::MaybeUninit::uninit();
3225     let ptr = UNINIT.as_ptr();
3226     assert_eq!(
3227         ::std::mem::size_of::<hax_module_version>(),
3228         8usize,
3229         concat!("Size of: ", stringify!(hax_module_version))
3230     );
3231     assert_eq!(
3232         ::std::mem::align_of::<hax_module_version>(),
3233         1usize,
3234         concat!("Alignment of ", stringify!(hax_module_version))
3235     );
3236     assert_eq!(
3237         unsafe { ::std::ptr::addr_of!((*ptr).compat_version) as usize - ptr as usize },
3238         0usize,
3239         concat!(
3240             "Offset of field: ",
3241             stringify!(hax_module_version),
3242             "::",
3243             stringify!(compat_version)
3244         )
3245     );
3246     assert_eq!(
3247         unsafe { ::std::ptr::addr_of!((*ptr).cur_version) as usize - ptr as usize },
3248         4usize,
3249         concat!(
3250             "Offset of field: ",
3251             stringify!(hax_module_version),
3252             "::",
3253             stringify!(cur_version)
3254         )
3255     );
3256 }
3257 #[repr(C, packed)]
3258 #[derive(Debug, Default, Copy, Clone)]
3259 pub struct hax_capabilityinfo {
3260     pub wstatus: u16,
3261     pub winfo: u16,
3262     pub win_refcount: u32,
3263     pub mem_quota: u64,
3264 }
3265 #[test]
bindgen_test_layout_hax_capabilityinfo()3266 fn bindgen_test_layout_hax_capabilityinfo() {
3267     const UNINIT: ::std::mem::MaybeUninit<hax_capabilityinfo> = ::std::mem::MaybeUninit::uninit();
3268     let ptr = UNINIT.as_ptr();
3269     assert_eq!(
3270         ::std::mem::size_of::<hax_capabilityinfo>(),
3271         16usize,
3272         concat!("Size of: ", stringify!(hax_capabilityinfo))
3273     );
3274     assert_eq!(
3275         ::std::mem::align_of::<hax_capabilityinfo>(),
3276         1usize,
3277         concat!("Alignment of ", stringify!(hax_capabilityinfo))
3278     );
3279     assert_eq!(
3280         unsafe { ::std::ptr::addr_of!((*ptr).wstatus) as usize - ptr as usize },
3281         0usize,
3282         concat!(
3283             "Offset of field: ",
3284             stringify!(hax_capabilityinfo),
3285             "::",
3286             stringify!(wstatus)
3287         )
3288     );
3289     assert_eq!(
3290         unsafe { ::std::ptr::addr_of!((*ptr).winfo) as usize - ptr as usize },
3291         2usize,
3292         concat!(
3293             "Offset of field: ",
3294             stringify!(hax_capabilityinfo),
3295             "::",
3296             stringify!(winfo)
3297         )
3298     );
3299     assert_eq!(
3300         unsafe { ::std::ptr::addr_of!((*ptr).win_refcount) as usize - ptr as usize },
3301         4usize,
3302         concat!(
3303             "Offset of field: ",
3304             stringify!(hax_capabilityinfo),
3305             "::",
3306             stringify!(win_refcount)
3307         )
3308     );
3309     assert_eq!(
3310         unsafe { ::std::ptr::addr_of!((*ptr).mem_quota) as usize - ptr as usize },
3311         8usize,
3312         concat!(
3313             "Offset of field: ",
3314             stringify!(hax_capabilityinfo),
3315             "::",
3316             stringify!(mem_quota)
3317         )
3318     );
3319 }
3320 #[repr(C, packed)]
3321 #[derive(Debug, Default, Copy, Clone)]
3322 pub struct hax_tunnel_info {
3323     pub va: u64,
3324     pub io_va: u64,
3325     pub size: u16,
3326     pub pad: [u16; 3usize],
3327 }
3328 #[test]
bindgen_test_layout_hax_tunnel_info()3329 fn bindgen_test_layout_hax_tunnel_info() {
3330     const UNINIT: ::std::mem::MaybeUninit<hax_tunnel_info> = ::std::mem::MaybeUninit::uninit();
3331     let ptr = UNINIT.as_ptr();
3332     assert_eq!(
3333         ::std::mem::size_of::<hax_tunnel_info>(),
3334         24usize,
3335         concat!("Size of: ", stringify!(hax_tunnel_info))
3336     );
3337     assert_eq!(
3338         ::std::mem::align_of::<hax_tunnel_info>(),
3339         1usize,
3340         concat!("Alignment of ", stringify!(hax_tunnel_info))
3341     );
3342     assert_eq!(
3343         unsafe { ::std::ptr::addr_of!((*ptr).va) as usize - ptr as usize },
3344         0usize,
3345         concat!(
3346             "Offset of field: ",
3347             stringify!(hax_tunnel_info),
3348             "::",
3349             stringify!(va)
3350         )
3351     );
3352     assert_eq!(
3353         unsafe { ::std::ptr::addr_of!((*ptr).io_va) as usize - ptr as usize },
3354         8usize,
3355         concat!(
3356             "Offset of field: ",
3357             stringify!(hax_tunnel_info),
3358             "::",
3359             stringify!(io_va)
3360         )
3361     );
3362     assert_eq!(
3363         unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
3364         16usize,
3365         concat!(
3366             "Offset of field: ",
3367             stringify!(hax_tunnel_info),
3368             "::",
3369             stringify!(size)
3370         )
3371     );
3372     assert_eq!(
3373         unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize },
3374         18usize,
3375         concat!(
3376             "Offset of field: ",
3377             stringify!(hax_tunnel_info),
3378             "::",
3379             stringify!(pad)
3380         )
3381     );
3382 }
3383 #[repr(C, packed)]
3384 #[derive(Debug, Default, Copy, Clone)]
3385 pub struct hax_set_memlimit {
3386     pub enable_memlimit: u8,
3387     pub pad: [u8; 7usize],
3388     pub memory_limit: u64,
3389 }
3390 #[test]
bindgen_test_layout_hax_set_memlimit()3391 fn bindgen_test_layout_hax_set_memlimit() {
3392     const UNINIT: ::std::mem::MaybeUninit<hax_set_memlimit> = ::std::mem::MaybeUninit::uninit();
3393     let ptr = UNINIT.as_ptr();
3394     assert_eq!(
3395         ::std::mem::size_of::<hax_set_memlimit>(),
3396         16usize,
3397         concat!("Size of: ", stringify!(hax_set_memlimit))
3398     );
3399     assert_eq!(
3400         ::std::mem::align_of::<hax_set_memlimit>(),
3401         1usize,
3402         concat!("Alignment of ", stringify!(hax_set_memlimit))
3403     );
3404     assert_eq!(
3405         unsafe { ::std::ptr::addr_of!((*ptr).enable_memlimit) as usize - ptr as usize },
3406         0usize,
3407         concat!(
3408             "Offset of field: ",
3409             stringify!(hax_set_memlimit),
3410             "::",
3411             stringify!(enable_memlimit)
3412         )
3413     );
3414     assert_eq!(
3415         unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize },
3416         1usize,
3417         concat!(
3418             "Offset of field: ",
3419             stringify!(hax_set_memlimit),
3420             "::",
3421             stringify!(pad)
3422         )
3423     );
3424     assert_eq!(
3425         unsafe { ::std::ptr::addr_of!((*ptr).memory_limit) as usize - ptr as usize },
3426         8usize,
3427         concat!(
3428             "Offset of field: ",
3429             stringify!(hax_set_memlimit),
3430             "::",
3431             stringify!(memory_limit)
3432         )
3433     );
3434 }
3435 #[repr(C, packed)]
3436 #[derive(Debug, Default, Copy, Clone)]
3437 pub struct hax_alloc_ram_info {
3438     pub size: u32,
3439     pub pad: u32,
3440     pub va: u64,
3441 }
3442 #[test]
bindgen_test_layout_hax_alloc_ram_info()3443 fn bindgen_test_layout_hax_alloc_ram_info() {
3444     const UNINIT: ::std::mem::MaybeUninit<hax_alloc_ram_info> = ::std::mem::MaybeUninit::uninit();
3445     let ptr = UNINIT.as_ptr();
3446     assert_eq!(
3447         ::std::mem::size_of::<hax_alloc_ram_info>(),
3448         16usize,
3449         concat!("Size of: ", stringify!(hax_alloc_ram_info))
3450     );
3451     assert_eq!(
3452         ::std::mem::align_of::<hax_alloc_ram_info>(),
3453         1usize,
3454         concat!("Alignment of ", stringify!(hax_alloc_ram_info))
3455     );
3456     assert_eq!(
3457         unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
3458         0usize,
3459         concat!(
3460             "Offset of field: ",
3461             stringify!(hax_alloc_ram_info),
3462             "::",
3463             stringify!(size)
3464         )
3465     );
3466     assert_eq!(
3467         unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize },
3468         4usize,
3469         concat!(
3470             "Offset of field: ",
3471             stringify!(hax_alloc_ram_info),
3472             "::",
3473             stringify!(pad)
3474         )
3475     );
3476     assert_eq!(
3477         unsafe { ::std::ptr::addr_of!((*ptr).va) as usize - ptr as usize },
3478         8usize,
3479         concat!(
3480             "Offset of field: ",
3481             stringify!(hax_alloc_ram_info),
3482             "::",
3483             stringify!(va)
3484         )
3485     );
3486 }
3487 #[repr(C, packed)]
3488 #[derive(Debug, Default, Copy, Clone)]
3489 pub struct hax_ramblock_info {
3490     pub start_va: u64,
3491     pub size: u64,
3492     pub reserved: u64,
3493 }
3494 #[test]
bindgen_test_layout_hax_ramblock_info()3495 fn bindgen_test_layout_hax_ramblock_info() {
3496     const UNINIT: ::std::mem::MaybeUninit<hax_ramblock_info> = ::std::mem::MaybeUninit::uninit();
3497     let ptr = UNINIT.as_ptr();
3498     assert_eq!(
3499         ::std::mem::size_of::<hax_ramblock_info>(),
3500         24usize,
3501         concat!("Size of: ", stringify!(hax_ramblock_info))
3502     );
3503     assert_eq!(
3504         ::std::mem::align_of::<hax_ramblock_info>(),
3505         1usize,
3506         concat!("Alignment of ", stringify!(hax_ramblock_info))
3507     );
3508     assert_eq!(
3509         unsafe { ::std::ptr::addr_of!((*ptr).start_va) as usize - ptr as usize },
3510         0usize,
3511         concat!(
3512             "Offset of field: ",
3513             stringify!(hax_ramblock_info),
3514             "::",
3515             stringify!(start_va)
3516         )
3517     );
3518     assert_eq!(
3519         unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
3520         8usize,
3521         concat!(
3522             "Offset of field: ",
3523             stringify!(hax_ramblock_info),
3524             "::",
3525             stringify!(size)
3526         )
3527     );
3528     assert_eq!(
3529         unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize },
3530         16usize,
3531         concat!(
3532             "Offset of field: ",
3533             stringify!(hax_ramblock_info),
3534             "::",
3535             stringify!(reserved)
3536         )
3537     );
3538 }
3539 #[repr(C, packed)]
3540 #[derive(Debug, Default, Copy, Clone)]
3541 pub struct hax_set_ram_info {
3542     pub pa_start: u64,
3543     pub size: u32,
3544     pub flags: u8,
3545     pub pad: [u8; 3usize],
3546     pub va: u64,
3547 }
3548 #[test]
bindgen_test_layout_hax_set_ram_info()3549 fn bindgen_test_layout_hax_set_ram_info() {
3550     const UNINIT: ::std::mem::MaybeUninit<hax_set_ram_info> = ::std::mem::MaybeUninit::uninit();
3551     let ptr = UNINIT.as_ptr();
3552     assert_eq!(
3553         ::std::mem::size_of::<hax_set_ram_info>(),
3554         24usize,
3555         concat!("Size of: ", stringify!(hax_set_ram_info))
3556     );
3557     assert_eq!(
3558         ::std::mem::align_of::<hax_set_ram_info>(),
3559         1usize,
3560         concat!("Alignment of ", stringify!(hax_set_ram_info))
3561     );
3562     assert_eq!(
3563         unsafe { ::std::ptr::addr_of!((*ptr).pa_start) as usize - ptr as usize },
3564         0usize,
3565         concat!(
3566             "Offset of field: ",
3567             stringify!(hax_set_ram_info),
3568             "::",
3569             stringify!(pa_start)
3570         )
3571     );
3572     assert_eq!(
3573         unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
3574         8usize,
3575         concat!(
3576             "Offset of field: ",
3577             stringify!(hax_set_ram_info),
3578             "::",
3579             stringify!(size)
3580         )
3581     );
3582     assert_eq!(
3583         unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
3584         12usize,
3585         concat!(
3586             "Offset of field: ",
3587             stringify!(hax_set_ram_info),
3588             "::",
3589             stringify!(flags)
3590         )
3591     );
3592     assert_eq!(
3593         unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize },
3594         13usize,
3595         concat!(
3596             "Offset of field: ",
3597             stringify!(hax_set_ram_info),
3598             "::",
3599             stringify!(pad)
3600         )
3601     );
3602     assert_eq!(
3603         unsafe { ::std::ptr::addr_of!((*ptr).va) as usize - ptr as usize },
3604         16usize,
3605         concat!(
3606             "Offset of field: ",
3607             stringify!(hax_set_ram_info),
3608             "::",
3609             stringify!(va)
3610         )
3611     );
3612 }
3613 #[repr(C, packed)]
3614 #[derive(Debug, Default, Copy, Clone)]
3615 pub struct hax_set_ram_info2 {
3616     pub pa_start: u64,
3617     pub size: u64,
3618     pub va: u64,
3619     pub flags: u32,
3620     pub reserved1: u32,
3621     pub reserved2: u64,
3622 }
3623 #[test]
bindgen_test_layout_hax_set_ram_info2()3624 fn bindgen_test_layout_hax_set_ram_info2() {
3625     const UNINIT: ::std::mem::MaybeUninit<hax_set_ram_info2> = ::std::mem::MaybeUninit::uninit();
3626     let ptr = UNINIT.as_ptr();
3627     assert_eq!(
3628         ::std::mem::size_of::<hax_set_ram_info2>(),
3629         40usize,
3630         concat!("Size of: ", stringify!(hax_set_ram_info2))
3631     );
3632     assert_eq!(
3633         ::std::mem::align_of::<hax_set_ram_info2>(),
3634         1usize,
3635         concat!("Alignment of ", stringify!(hax_set_ram_info2))
3636     );
3637     assert_eq!(
3638         unsafe { ::std::ptr::addr_of!((*ptr).pa_start) as usize - ptr as usize },
3639         0usize,
3640         concat!(
3641             "Offset of field: ",
3642             stringify!(hax_set_ram_info2),
3643             "::",
3644             stringify!(pa_start)
3645         )
3646     );
3647     assert_eq!(
3648         unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
3649         8usize,
3650         concat!(
3651             "Offset of field: ",
3652             stringify!(hax_set_ram_info2),
3653             "::",
3654             stringify!(size)
3655         )
3656     );
3657     assert_eq!(
3658         unsafe { ::std::ptr::addr_of!((*ptr).va) as usize - ptr as usize },
3659         16usize,
3660         concat!(
3661             "Offset of field: ",
3662             stringify!(hax_set_ram_info2),
3663             "::",
3664             stringify!(va)
3665         )
3666     );
3667     assert_eq!(
3668         unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
3669         24usize,
3670         concat!(
3671             "Offset of field: ",
3672             stringify!(hax_set_ram_info2),
3673             "::",
3674             stringify!(flags)
3675         )
3676     );
3677     assert_eq!(
3678         unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize },
3679         28usize,
3680         concat!(
3681             "Offset of field: ",
3682             stringify!(hax_set_ram_info2),
3683             "::",
3684             stringify!(reserved1)
3685         )
3686     );
3687     assert_eq!(
3688         unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize },
3689         32usize,
3690         concat!(
3691             "Offset of field: ",
3692             stringify!(hax_set_ram_info2),
3693             "::",
3694             stringify!(reserved2)
3695         )
3696     );
3697 }
3698 #[repr(C, packed)]
3699 #[derive(Debug, Default, Copy, Clone)]
3700 pub struct hax_protect_ram_info {
3701     pub pa_start: u64,
3702     pub size: u64,
3703     pub flags: u32,
3704     pub reserved: u32,
3705 }
3706 #[test]
bindgen_test_layout_hax_protect_ram_info()3707 fn bindgen_test_layout_hax_protect_ram_info() {
3708     const UNINIT: ::std::mem::MaybeUninit<hax_protect_ram_info> = ::std::mem::MaybeUninit::uninit();
3709     let ptr = UNINIT.as_ptr();
3710     assert_eq!(
3711         ::std::mem::size_of::<hax_protect_ram_info>(),
3712         24usize,
3713         concat!("Size of: ", stringify!(hax_protect_ram_info))
3714     );
3715     assert_eq!(
3716         ::std::mem::align_of::<hax_protect_ram_info>(),
3717         1usize,
3718         concat!("Alignment of ", stringify!(hax_protect_ram_info))
3719     );
3720     assert_eq!(
3721         unsafe { ::std::ptr::addr_of!((*ptr).pa_start) as usize - ptr as usize },
3722         0usize,
3723         concat!(
3724             "Offset of field: ",
3725             stringify!(hax_protect_ram_info),
3726             "::",
3727             stringify!(pa_start)
3728         )
3729     );
3730     assert_eq!(
3731         unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
3732         8usize,
3733         concat!(
3734             "Offset of field: ",
3735             stringify!(hax_protect_ram_info),
3736             "::",
3737             stringify!(size)
3738         )
3739     );
3740     assert_eq!(
3741         unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
3742         16usize,
3743         concat!(
3744             "Offset of field: ",
3745             stringify!(hax_protect_ram_info),
3746             "::",
3747             stringify!(flags)
3748         )
3749     );
3750     assert_eq!(
3751         unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize },
3752         20usize,
3753         concat!(
3754             "Offset of field: ",
3755             stringify!(hax_protect_ram_info),
3756             "::",
3757             stringify!(reserved)
3758         )
3759     );
3760 }
3761 #[repr(C, packed)]
3762 #[derive(Debug, Default, Copy, Clone)]
3763 pub struct hax_qemu_version {
3764     pub cur_version: u32,
3765     pub least_version: u32,
3766 }
3767 #[test]
bindgen_test_layout_hax_qemu_version()3768 fn bindgen_test_layout_hax_qemu_version() {
3769     const UNINIT: ::std::mem::MaybeUninit<hax_qemu_version> = ::std::mem::MaybeUninit::uninit();
3770     let ptr = UNINIT.as_ptr();
3771     assert_eq!(
3772         ::std::mem::size_of::<hax_qemu_version>(),
3773         8usize,
3774         concat!("Size of: ", stringify!(hax_qemu_version))
3775     );
3776     assert_eq!(
3777         ::std::mem::align_of::<hax_qemu_version>(),
3778         1usize,
3779         concat!("Alignment of ", stringify!(hax_qemu_version))
3780     );
3781     assert_eq!(
3782         unsafe { ::std::ptr::addr_of!((*ptr).cur_version) as usize - ptr as usize },
3783         0usize,
3784         concat!(
3785             "Offset of field: ",
3786             stringify!(hax_qemu_version),
3787             "::",
3788             stringify!(cur_version)
3789         )
3790     );
3791     assert_eq!(
3792         unsafe { ::std::ptr::addr_of!((*ptr).least_version) as usize - ptr as usize },
3793         4usize,
3794         concat!(
3795             "Offset of field: ",
3796             stringify!(hax_qemu_version),
3797             "::",
3798             stringify!(least_version)
3799         )
3800     );
3801 }
3802 #[repr(C, packed)]
3803 #[derive(Debug, Default, Copy, Clone)]
3804 pub struct hax_debug_t {
3805     pub control: u32,
3806     pub reserved: u32,
3807     pub dr: [u64; 8usize],
3808 }
3809 #[test]
bindgen_test_layout_hax_debug_t()3810 fn bindgen_test_layout_hax_debug_t() {
3811     const UNINIT: ::std::mem::MaybeUninit<hax_debug_t> = ::std::mem::MaybeUninit::uninit();
3812     let ptr = UNINIT.as_ptr();
3813     assert_eq!(
3814         ::std::mem::size_of::<hax_debug_t>(),
3815         72usize,
3816         concat!("Size of: ", stringify!(hax_debug_t))
3817     );
3818     assert_eq!(
3819         ::std::mem::align_of::<hax_debug_t>(),
3820         1usize,
3821         concat!("Alignment of ", stringify!(hax_debug_t))
3822     );
3823     assert_eq!(
3824         unsafe { ::std::ptr::addr_of!((*ptr).control) as usize - ptr as usize },
3825         0usize,
3826         concat!(
3827             "Offset of field: ",
3828             stringify!(hax_debug_t),
3829             "::",
3830             stringify!(control)
3831         )
3832     );
3833     assert_eq!(
3834         unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize },
3835         4usize,
3836         concat!(
3837             "Offset of field: ",
3838             stringify!(hax_debug_t),
3839             "::",
3840             stringify!(reserved)
3841         )
3842     );
3843     assert_eq!(
3844         unsafe { ::std::ptr::addr_of!((*ptr).dr) as usize - ptr as usize },
3845         8usize,
3846         concat!(
3847             "Offset of field: ",
3848             stringify!(hax_debug_t),
3849             "::",
3850             stringify!(dr)
3851         )
3852     );
3853 }
3854 #[repr(C)]
3855 #[derive(Debug, Default, Copy, Clone)]
3856 pub struct hax_cpuid_entry {
3857     pub function: u32,
3858     pub index: u32,
3859     pub flags: u32,
3860     pub eax: u32,
3861     pub ebx: u32,
3862     pub ecx: u32,
3863     pub edx: u32,
3864     pub pad: [u32; 3usize],
3865 }
3866 #[test]
bindgen_test_layout_hax_cpuid_entry()3867 fn bindgen_test_layout_hax_cpuid_entry() {
3868     const UNINIT: ::std::mem::MaybeUninit<hax_cpuid_entry> = ::std::mem::MaybeUninit::uninit();
3869     let ptr = UNINIT.as_ptr();
3870     assert_eq!(
3871         ::std::mem::size_of::<hax_cpuid_entry>(),
3872         40usize,
3873         concat!("Size of: ", stringify!(hax_cpuid_entry))
3874     );
3875     assert_eq!(
3876         ::std::mem::align_of::<hax_cpuid_entry>(),
3877         4usize,
3878         concat!("Alignment of ", stringify!(hax_cpuid_entry))
3879     );
3880     assert_eq!(
3881         unsafe { ::std::ptr::addr_of!((*ptr).function) as usize - ptr as usize },
3882         0usize,
3883         concat!(
3884             "Offset of field: ",
3885             stringify!(hax_cpuid_entry),
3886             "::",
3887             stringify!(function)
3888         )
3889     );
3890     assert_eq!(
3891         unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize },
3892         4usize,
3893         concat!(
3894             "Offset of field: ",
3895             stringify!(hax_cpuid_entry),
3896             "::",
3897             stringify!(index)
3898         )
3899     );
3900     assert_eq!(
3901         unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
3902         8usize,
3903         concat!(
3904             "Offset of field: ",
3905             stringify!(hax_cpuid_entry),
3906             "::",
3907             stringify!(flags)
3908         )
3909     );
3910     assert_eq!(
3911         unsafe { ::std::ptr::addr_of!((*ptr).eax) as usize - ptr as usize },
3912         12usize,
3913         concat!(
3914             "Offset of field: ",
3915             stringify!(hax_cpuid_entry),
3916             "::",
3917             stringify!(eax)
3918         )
3919     );
3920     assert_eq!(
3921         unsafe { ::std::ptr::addr_of!((*ptr).ebx) as usize - ptr as usize },
3922         16usize,
3923         concat!(
3924             "Offset of field: ",
3925             stringify!(hax_cpuid_entry),
3926             "::",
3927             stringify!(ebx)
3928         )
3929     );
3930     assert_eq!(
3931         unsafe { ::std::ptr::addr_of!((*ptr).ecx) as usize - ptr as usize },
3932         20usize,
3933         concat!(
3934             "Offset of field: ",
3935             stringify!(hax_cpuid_entry),
3936             "::",
3937             stringify!(ecx)
3938         )
3939     );
3940     assert_eq!(
3941         unsafe { ::std::ptr::addr_of!((*ptr).edx) as usize - ptr as usize },
3942         24usize,
3943         concat!(
3944             "Offset of field: ",
3945             stringify!(hax_cpuid_entry),
3946             "::",
3947             stringify!(edx)
3948         )
3949     );
3950     assert_eq!(
3951         unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize },
3952         28usize,
3953         concat!(
3954             "Offset of field: ",
3955             stringify!(hax_cpuid_entry),
3956             "::",
3957             stringify!(pad)
3958         )
3959     );
3960 }
3961 #[repr(C)]
3962 #[derive(Debug, Default)]
3963 pub struct hax_cpuid {
3964     pub total: u32,
3965     pub pad: u32,
3966     pub entries: __IncompleteArrayField<hax_cpuid_entry>,
3967 }
3968 #[test]
bindgen_test_layout_hax_cpuid()3969 fn bindgen_test_layout_hax_cpuid() {
3970     const UNINIT: ::std::mem::MaybeUninit<hax_cpuid> = ::std::mem::MaybeUninit::uninit();
3971     let ptr = UNINIT.as_ptr();
3972     assert_eq!(
3973         ::std::mem::size_of::<hax_cpuid>(),
3974         8usize,
3975         concat!("Size of: ", stringify!(hax_cpuid))
3976     );
3977     assert_eq!(
3978         ::std::mem::align_of::<hax_cpuid>(),
3979         4usize,
3980         concat!("Alignment of ", stringify!(hax_cpuid))
3981     );
3982     assert_eq!(
3983         unsafe { ::std::ptr::addr_of!((*ptr).total) as usize - ptr as usize },
3984         0usize,
3985         concat!(
3986             "Offset of field: ",
3987             stringify!(hax_cpuid),
3988             "::",
3989             stringify!(total)
3990         )
3991     );
3992     assert_eq!(
3993         unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize },
3994         4usize,
3995         concat!(
3996             "Offset of field: ",
3997             stringify!(hax_cpuid),
3998             "::",
3999             stringify!(pad)
4000         )
4001     );
4002     assert_eq!(
4003         unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize },
4004         8usize,
4005         concat!(
4006             "Offset of field: ",
4007             stringify!(hax_cpuid),
4008             "::",
4009             stringify!(entries)
4010         )
4011     );
4012 }
4013 #[repr(C)]
4014 #[derive(Debug, Copy, Clone)]
4015 pub struct hax_log_file {
4016     pub path: [wchar_t; 2048usize],
4017 }
4018 #[test]
bindgen_test_layout_hax_log_file()4019 fn bindgen_test_layout_hax_log_file() {
4020     const UNINIT: ::std::mem::MaybeUninit<hax_log_file> = ::std::mem::MaybeUninit::uninit();
4021     let ptr = UNINIT.as_ptr();
4022     assert_eq!(
4023         ::std::mem::size_of::<hax_log_file>(),
4024         4096usize,
4025         concat!("Size of: ", stringify!(hax_log_file))
4026     );
4027     assert_eq!(
4028         ::std::mem::align_of::<hax_log_file>(),
4029         2usize,
4030         concat!("Alignment of ", stringify!(hax_log_file))
4031     );
4032     assert_eq!(
4033         unsafe { ::std::ptr::addr_of!((*ptr).path) as usize - ptr as usize },
4034         0usize,
4035         concat!(
4036             "Offset of field: ",
4037             stringify!(hax_log_file),
4038             "::",
4039             stringify!(path)
4040         )
4041     );
4042 }
4043 impl Default for hax_log_file {
default() -> Self4044     fn default() -> Self {
4045         let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4046         unsafe {
4047             ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4048             s.assume_init()
4049         }
4050     }
4051 }
4052