pub const INTERFACE_H: u32 = 1;
pub const CONSTS_H: u32 = 1;
pub const MINTAPE: u32 = 10;
pub const MAXTAPE: u32 = 30;
pub const NTAPES: u32 = 21;
pub const MAXCYCLES: u32 = 100000;
pub const MAXNEST: u32 = 4096;
pub type wchar_t = ::std::os::raw::c_int;
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct max_align_t {
pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
pub __bindgen_padding_0: u64,
pub __clang_max_align_nonce2: u128,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of max_align_t"][::std::mem::size_of::<max_align_t>() - 32usize];
["Alignment of max_align_t"][::std::mem::align_of::<max_align_t>() - 16usize];
["Offset of field: max_align_t::__clang_max_align_nonce1"]
[::std::mem::offset_of!(max_align_t, __clang_max_align_nonce1) - 0usize];
["Offset of field: max_align_t::__clang_max_align_nonce2"]
[::std::mem::offset_of!(max_align_t, __clang_max_align_nonce2) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gearlance_compile_input {
pub data: *const ::std::os::raw::c_char,
pub length: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of gearlance_compile_input"][::std::mem::size_of::<gearlance_compile_input>() - 16usize];
["Alignment of gearlance_compile_input"]
[::std::mem::align_of::<gearlance_compile_input>() - 8usize];
["Offset of field: gearlance_compile_input::data"]
[::std::mem::offset_of!(gearlance_compile_input, data) - 0usize];
["Offset of field: gearlance_compile_input::length"]
[::std::mem::offset_of!(gearlance_compile_input, length) - 8usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gearlance_compiled_program {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gearlance_compile_result {
pub error_encountered: bool,
pub err_msg: *const ::std::os::raw::c_char,
pub program: *mut gearlance_compiled_program,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of gearlance_compile_result"]
[::std::mem::size_of::<gearlance_compile_result>() - 24usize];
["Alignment of gearlance_compile_result"]
[::std::mem::align_of::<gearlance_compile_result>() - 8usize];
["Offset of field: gearlance_compile_result::error_encountered"]
[::std::mem::offset_of!(gearlance_compile_result, error_encountered) - 0usize];
["Offset of field: gearlance_compile_result::err_msg"]
[::std::mem::offset_of!(gearlance_compile_result, err_msg) - 8usize];
["Offset of field: gearlance_compile_result::program"]
[::std::mem::offset_of!(gearlance_compile_result, program) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gearlance_execute_input {
pub program_left: *mut gearlance_compiled_program,
pub program_right: *mut gearlance_compiled_program,
pub track_stats: bool,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of gearlance_execute_input"][::std::mem::size_of::<gearlance_execute_input>() - 24usize];
["Alignment of gearlance_execute_input"]
[::std::mem::align_of::<gearlance_execute_input>() - 8usize];
["Offset of field: gearlance_execute_input::program_left"]
[::std::mem::offset_of!(gearlance_execute_input, program_left) - 0usize];
["Offset of field: gearlance_execute_input::program_right"]
[::std::mem::offset_of!(gearlance_execute_input, program_right) - 8usize];
["Offset of field: gearlance_execute_input::track_stats"]
[::std::mem::offset_of!(gearlance_execute_input, track_stats) - 16usize];
};
pub const gearlance_end_type_gearlance_end_time: gearlance_end_type = 0;
pub const gearlance_end_type_gearlance_end_flag: gearlance_end_type = 1;
pub const gearlance_end_type_gearlance_end_tape: gearlance_end_type = 2;
pub const gearlance_end_type_gearlance_end_unknown: gearlance_end_type = 3;
pub type gearlance_end_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gearlance_execute_result {
pub scores: [[::std::os::raw::c_int; 31usize]; 2usize],
pub end_type: [[gearlance_end_type; 31usize]; 2usize],
pub cycles: ::std::os::raw::c_ulonglong,
pub tape_max: [[::std::os::raw::c_uchar; 30usize]; 2usize],
pub heat_position: [[::std::os::raw::c_uint; 30usize]; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of gearlance_execute_result"]
[::std::mem::size_of::<gearlance_execute_result>() - 808usize];
["Alignment of gearlance_execute_result"]
[::std::mem::align_of::<gearlance_execute_result>() - 8usize];
["Offset of field: gearlance_execute_result::scores"]
[::std::mem::offset_of!(gearlance_execute_result, scores) - 0usize];
["Offset of field: gearlance_execute_result::end_type"]
[::std::mem::offset_of!(gearlance_execute_result, end_type) - 248usize];
["Offset of field: gearlance_execute_result::cycles"]
[::std::mem::offset_of!(gearlance_execute_result, cycles) - 496usize];
["Offset of field: gearlance_execute_result::tape_max"]
[::std::mem::offset_of!(gearlance_execute_result, tape_max) - 504usize];
["Offset of field: gearlance_execute_result::heat_position"]
[::std::mem::offset_of!(gearlance_execute_result, heat_position) - 564usize];
};
extern "C" {
pub fn gearlance_compile(input: gearlance_compile_input) -> gearlance_compile_result;
}
extern "C" {
pub fn gearlance_execute(input: gearlance_execute_input, output: *mut gearlance_execute_result);
}
extern "C" {
pub fn gearlance_free_program(program: *mut gearlance_compiled_program);
}