You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: system_calls.rs
    path of file: ./repos/scryer-prolog/src/machine
    
    the code of the file until where you have to start completion: use crate::parser::ast::*;
use crate::parser::parser::*;

use dashu::integer::{Sign, UBig};
use lazy_static::lazy_static;
use num_order::NumOrd;

use crate::arena::*;
use crate::atom_table::*;
#[cfg(feature = "ffi")]
use crate::ffi::*;
use crate::forms::*;
use crate::heap_iter::*;
use crate::heap_print::*;
#[cfg(feature = "http")]
use crate::http::{HttpListener, HttpRequest, HttpRequestData, HttpResponse};
use crate::instructions::*;
use crate::machine;
use crate::machine::code_walker::*;
use crate::machine::copier::*;
use crate::machine::heap::*;
use crate::machine::machine_errors::*;
use crate::machine::machine_indices::*;
use crate::machine::machine_state::*;
use crate::machine::partial_string::*;
use crate::machine::preprocessor::to_op_decl;
use crate::machine::stack::*;
use crate::machine::streams::*;
use crate::machine::{get_structure_index, Machine, VERIFY_ATTR_INTERRUPT_LOC};
use crate::parser::char_reader::*;
use crate::parser::dashu::Integer;
use crate::read::*;
use crate::types::*;
use rand::rngs::StdRng;
use rand::{Rng, SeedableRng};

use ordered_float::OrderedFloat;

use fxhash::{FxBuildHasher, FxHasher};
use indexmap::IndexSet;

pub(crate) use ref_thread_local::RefThreadLocal;

use std::cell::Cell;
use std::cmp::Ordering;
use std::collections::BTreeSet;
use std::convert::TryFrom;
use std::env;
#[cfg(feature = "ffi")]
use std::ffi::CString;
use std::fs;
use std::hash::{BuildHasher, BuildHasherDefault};
#[cfg(feature = "http")]
use std::io::BufRead;
use std::io::{ErrorKind, Read, Write};
use std::iter::{once, FromIterator};
use std::mem;
#[cfg(feature = "http")]
use std::net::{SocketAddr, ToSocketAddrs};
use std::net::{TcpListener, TcpStream};
use std::num::NonZeroU32;
use std::ops::Sub;
use std::
    
    fn cycle_step(&mut self, heap: &[HeapCellValue]) -> Option<CycleSearchResult> {
        loop {
            let value = heap[self.hare];

            read_heap_cell!(value,
                (HeapCellValueTag::PStrLoc, h) => {
                    return self.add_pstr_chars_and_step(heap, h);
                }
                (HeapCellValueTag::CStr | HeapCellValueTag::PStrOffset) => {
                    return self.add_pstr_chars_and_step(heap, self.hare);
                }
                (HeapCellValueTag::Lis, h) => {
                    return self.step(h+1);
                }
                (HeapCellValueTag::Str, s) => {
                    let (name, arity) = cell_as_atom_cell!(heap[s]).get_name_and_arity();

                    return if name == atom!(".") && arity == 2 {
                        self.step(s+2)
                    } else {
                        Some(CycleSearchResult::NotList(self.num_steps(), value))
                    };
                }
                (HeapCellValueTag::Atom, (name, arity)) => {
                    debug_assert!(arity == 0);

                    return if name == atom!("[]") {
                        Some(CycleSearchResult::ProperList(self.num_steps()))
                    } else {
                        Some(CycleSearchResult::NotList(self.num_steps(), value))
                    };
                }
                (HeapCellValueTag::AttrVar | HeapCellValueTag::Var, h) => {
                    if self.hare == h {
                        let r = value.as_var().unwrap();
                        return Some(CycleSearchResult::PartialList(self.num_steps(), r));
                    }

                    self.hare = h;
                }
                _ => {
                    return Some(CycleSearchResult::NotList(self.num_steps(), value));
                }
            );
        }
    }