/* automatically generated by rust-bindgen 0.68.1 */

pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type hand_index_t = u64;
pub type hand_indexer_t = hand_indexer_s;
pub type hand_indexer_state_t = hand_indexer_state_s;
extern "C" {
    pub fn hand_indexer_init(
        rounds: uint_fast32_t,
        cards_per_round: *const u8,
        indexer: *mut hand_indexer_t,
    ) -> bool;
}
extern "C" {
    pub fn hand_indexer_free(indexer: *mut hand_indexer_t);
}
extern "C" {
    pub fn hand_indexer_size(indexer: *const hand_indexer_t, round: uint_fast32_t) -> hand_index_t;
}
extern "C" {
    pub fn hand_indexer_state_init(
        indexer: *const hand_indexer_t,
        state: *mut hand_indexer_state_t,
    );
}
extern "C" {
    pub fn hand_index_all(
        indexer: *const hand_indexer_t,
        cards: *const u8,
        indices: *mut hand_index_t,
    ) -> hand_index_t;
}
extern "C" {
    pub fn hand_index_last(indexer: *const hand_indexer_t, cards: *const u8) -> hand_index_t;
}
extern "C" {
    pub fn hand_index_next_round(
        indexer: *const hand_indexer_t,
        cards: *const u8,
        state: *mut hand_indexer_state_t,
    ) -> hand_index_t;
}
extern "C" {
    pub fn hand_unindex(
        indexer: *const hand_indexer_t,
        round: uint_fast32_t,
        index: hand_index_t,
        cards: *mut u8,
    ) -> bool;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hand_indexer_s {
    pub cards_per_round: [u8; 8usize],
    pub round_start: [u8; 8usize],
    pub rounds: uint_fast32_t,
    pub configurations: [uint_fast32_t; 8usize],
    pub permutations: [uint_fast32_t; 8usize],
    pub round_size: [hand_index_t; 8usize],
    pub permutation_to_configuration: [*mut uint_fast32_t; 8usize],
    pub permutation_to_pi: [*mut uint_fast32_t; 8usize],
    pub configuration_to_equal: [*mut uint_fast32_t; 8usize],
    pub configuration: [*mut [uint_fast32_t; 4usize]; 8usize],
    pub configuration_to_suit_size: [*mut [uint_fast32_t; 4usize]; 8usize],
    pub configuration_to_offset: [*mut hand_index_t; 8usize],
}
#[test]
fn bindgen_test_layout_hand_indexer_s() {
    const UNINIT: ::std::mem::MaybeUninit<hand_indexer_s> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<hand_indexer_s>(),
        600usize,
        concat!("Size of: ", stringify!(hand_indexer_s))
    );
    assert_eq!(
        ::std::mem::align_of::<hand_indexer_s>(),
        8usize,
        concat!("Alignment of ", stringify!(hand_indexer_s))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).cards_per_round) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(cards_per_round)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).round_start) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(round_start)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).rounds) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(rounds)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).configurations) as usize - ptr as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(configurations)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).permutations) as usize - ptr as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(permutations)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).round_size) as usize - ptr as usize },
        152usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(round_size)
        )
    );
    assert_eq!(
        unsafe {
            ::std::ptr::addr_of!((*ptr).permutation_to_configuration) as usize - ptr as usize
        },
        216usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(permutation_to_configuration)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).permutation_to_pi) as usize - ptr as usize },
        280usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(permutation_to_pi)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).configuration_to_equal) as usize - ptr as usize },
        344usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(configuration_to_equal)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).configuration) as usize - ptr as usize },
        408usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(configuration)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).configuration_to_suit_size) as usize - ptr as usize },
        472usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(configuration_to_suit_size)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).configuration_to_offset) as usize - ptr as usize },
        536usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_s),
            "::",
            stringify!(configuration_to_offset)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hand_indexer_state_s {
    pub suit_index: [uint_fast32_t; 4usize],
    pub suit_multiplier: [uint_fast32_t; 4usize],
    pub round: uint_fast32_t,
    pub permutation_index: uint_fast32_t,
    pub permutation_multiplier: uint_fast32_t,
    pub used_ranks: [u32; 4usize],
}
#[test]
fn bindgen_test_layout_hand_indexer_state_s() {
    const UNINIT: ::std::mem::MaybeUninit<hand_indexer_state_s> = ::std::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::std::mem::size_of::<hand_indexer_state_s>(),
        104usize,
        concat!("Size of: ", stringify!(hand_indexer_state_s))
    );
    assert_eq!(
        ::std::mem::align_of::<hand_indexer_state_s>(),
        8usize,
        concat!("Alignment of ", stringify!(hand_indexer_state_s))
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).suit_index) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_state_s),
            "::",
            stringify!(suit_index)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).suit_multiplier) as usize - ptr as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_state_s),
            "::",
            stringify!(suit_multiplier)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).round) as usize - ptr as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_state_s),
            "::",
            stringify!(round)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).permutation_index) as usize - ptr as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_state_s),
            "::",
            stringify!(permutation_index)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).permutation_multiplier) as usize - ptr as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_state_s),
            "::",
            stringify!(permutation_multiplier)
        )
    );
    assert_eq!(
        unsafe { ::std::ptr::addr_of!((*ptr).used_ranks) as usize - ptr as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(hand_indexer_state_s),
            "::",
            stringify!(used_ranks)
        )
    );
}
