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