\doxysection{integer.\+c}
\hypertarget{integer_8c_source}{}\label{integer_8c_source}\index{workspace/post-\/scarcity/src/arith/integer.c@{workspace/post-\/scarcity/src/arith/integer.c}}
\mbox{\hyperlink{integer_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00001}00001\ \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00002}00002\ \textcolor{comment}{\ *\ integer.c}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00003}00003\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00004}00004\ \textcolor{comment}{\ *\ functions\ for\ integer\ cells.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00005}00005\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00006}00006\ \textcolor{comment}{\ *\ (c)\ 2017\ Simon\ Brooke\ <simon@journeyman.cc>}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00007}00007\ \textcolor{comment}{\ *\ Licensed\ under\ GPL\ version\ 2.0,\ or,\ at\ your\ option,\ any\ later\ version.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00008}00008\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00009}00009\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00010}\mbox{\hyperlink{integer_8c_a369266c24eacffb87046522897a570d5}{00010}}\ \textcolor{preprocessor}{\#define\ \_GNU\_SOURCE}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00011}00011\ \textcolor{preprocessor}{\#include\ <limits.h>}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00012}00012\ \textcolor{preprocessor}{\#include\ <math.h>}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00013}00013\ \textcolor{preprocessor}{\#include\ <stdio.h>}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00014}00014\ \textcolor{preprocessor}{\#include\ <stdlib.h>}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00015}00015\ \textcolor{preprocessor}{\#include\ <inttypes.h>}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00016}00016\ \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00017}00017\ \textcolor{comment}{\ *\ wide\ characters}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00018}00018\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00019}00019\ \textcolor{preprocessor}{\#include\ <wchar.h>}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00020}00020\ \textcolor{preprocessor}{\#include\ <wctype.h>}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00021}00021\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00022}00022\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{integer_8h}{arith/integer.h}}"{}}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00023}00023\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{peano_8h}{arith/peano.h}}"{}}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00024}00024\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{debug_8h}{debug.h}}"{}}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00025}00025\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{conspage_8h}{memory/conspage.h}}"{}}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00026}00026\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{consspaceobject_8h}{memory/consspaceobject.h}}"{}}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00027}00027\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{equal_8h}{ops/equal.h}}"{}}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00028}00028\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{lispops_8h}{ops/lispops.h}}"{}}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00029}00029\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00030}00030\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00031}00031\ \textcolor{comment}{\ *\ hexadecimal\ digits\ for\ printing\ numbers.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00032}00032\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00033}\mbox{\hyperlink{integer_8c_a60dbddf98757946e2eafa70b4ea3d456}{00033}}\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\mbox{\hyperlink{integer_8c_a60dbddf98757946e2eafa70b4ea3d456}{hex\_digits}}\ =\ \textcolor{stringliteral}{"{}0123456789ABCDEF"{}};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00034}00034\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00035}00035\ \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00036}00036\ \textcolor{comment}{\ *\ Doctrine\ from\ here\ on\ in\ is\ that\ ALL\ integers\ are\ bignums,\ it's\ just}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00037}00037\ \textcolor{comment}{\ *\ that\ integers\ less\ than\ 61\ bits\ are\ bignums\ of\ one\ cell\ only.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00038}00038\ \textcolor{comment}{\ *\ that\ integers\ less\ than\ 61\ bits\ are\ bignums\ of\ one\ cell\ only.\ }}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00039}00039\ \textcolor{comment}{\ *\ TODO:\ why\ do\ I\ not\ have\ confidence\ to\ make\ this\ 64\ bits?}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00040}00040\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00041}00041\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00042}00042\ \ \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00043}00043\ \textcolor{comment}{\ \ *\ A\ small\_int\_cache\ array\ of\ pointers\ to\ the\ integers\ 0...23,}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00044}00044\ \textcolor{comment}{\ \ *\ used\ only\ by\ functions\ \`{}acquire\_integer(int64)\ =>\ cons\_pointer`\ and}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00045}00045\ \textcolor{comment}{\ \ *\ \`{}release\_integer(cons\_pointer)\ =>\ NULL`\ which,\ if\ the\ value\ desired\ is}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00046}00046\ \textcolor{comment}{\ \ *\ in\ the\ cache,\ supplies\ it\ from\ the\ cache,\ and,\ otherwise,\ calls\ }}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00047}00047\ \textcolor{comment}{\ \ *\ make\_integer()\ and\ dec\_ref()\ respectively.\ }}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00048}00048\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00049}00049\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00050}\mbox{\hyperlink{integer_8c_a5dacb21ddf2007d5ba24c9554e7979cd}{00050}}\ \textcolor{preprocessor}{\#define\ SMALL\_INT\_LIMIT\ 24}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00051}\mbox{\hyperlink{integer_8c_a08309d32c943a89296c8bdabe88fb6fb}{00051}}\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{integer_8c_a08309d32c943a89296c8bdabe88fb6fb}{small\_int\_cache\_initialised}}\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00052}\mbox{\hyperlink{integer_8c_a916ca64f2ce502d3f4564fa784ce6c62}{00052}}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8c_a916ca64f2ce502d3f4564fa784ce6c62}{small\_int\_cache}}[\mbox{\hyperlink{integer_8c_a5dacb21ddf2007d5ba24c9554e7979cd}{SMALL\_INT\_LIMIT}}];}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00053}00053\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00054}00054\ \textcolor{comment}{\ /**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00055}00055\ \textcolor{comment}{\ \ *\ Low\ level\ integer\ arithmetic,\ do\ not\ use\ elsewhere.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00056}00056\ \textcolor{comment}{\ \ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00057}00057\ \textcolor{comment}{\ \ *\ @param\ c\ a\ pointer\ to\ a\ cell,\ assumed\ to\ be\ an\ integer\ cell;}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00058}00058\ \textcolor{comment}{\ \ *\ @param\ op\ a\ character\ representing\ the\ operation:\ expected\ to\ be\ either}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00059}00059\ \textcolor{comment}{\ \ *\ '+'\ or\ '*';\ behaviour\ with\ other\ values\ is\ undefined.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00060}00060\ \textcolor{comment}{\ \ *\ @param\ is\_first\_cell\ true\ if\ this\ is\ the\ first\ cell\ in\ a\ bignum}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00061}00061\ \textcolor{comment}{\ \ *\ chain,\ else\ false.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00062}00062\ \textcolor{comment}{\ \ *\ \(\backslash\)see\ multiply\_integers}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00063}00063\ \textcolor{comment}{\ \ *\ \(\backslash\)see\ add\_integers}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00064}00064\ \textcolor{comment}{\ \ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00065}\mbox{\hyperlink{integer_8c_a71d79342cc501b3e8c20b3b27ed50eb6}{00065}}\ \_\_int128\_t\ \mbox{\hyperlink{integer_8c_a71d79342cc501b3e8c20b3b27ed50eb6}{cell\_value}}(\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ c,\ \textcolor{keywordtype}{char}\ op,\ \textcolor{keywordtype}{bool}\ is\_first\_cell\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00066}00066\ \ \ \ \ \textcolor{keywordtype}{long}\ \textcolor{keywordtype}{int}\ val\ =\ \mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ c\ )\ ?\ 0\ :\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ c\ ).payload.integer.value;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00067}00067\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00068}00068\ \ \ \ \ \textcolor{keywordtype}{long}\ \textcolor{keywordtype}{int}\ carry\ =\ is\_first\_cell\ ?\ 0\ :\ (\ \mbox{\hyperlink{peano_8h_ae4eb2d741f133542824727acb617b027}{INT\_CELL\_BASE}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00069}00069\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00070}00070\ \ \ \ \ \_\_int128\_t\ result\ =\ (\ \_\_int128\_t\ )\ \mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ c\ )\ ?}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00071}00071\ \ \ \ \ \ \ \ \ (\ val\ ==\ 0\ )\ ?\ carry\ :\ val\ :\ op\ ==\ \textcolor{charliteral}{'*'}\ ?\ 1\ :\ 0;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00072}00072\ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00073}00073\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ L\textcolor{stringliteral}{"{}cell\_value:\ raw\ value\ is\ \%ld,\ is\_first\_cell\ =\ \%s;\ '\%4.4s';\ returning\ "{}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00074}00074\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ val,\ is\_first\_cell\ ?\ \textcolor{stringliteral}{"{}true"{}}\ :\ \textcolor{stringliteral}{"{}false"{}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00075}00075\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ c\ ).tag.bytes\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00076}00076\ \ \ \ \ \mbox{\hyperlink{debug_8c_a3f7cae7c87ec9a0a47c3eebb37f7d538}{debug\_print\_128bit}}(\ result,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00077}00077\ \ \ \ \ \mbox{\hyperlink{debug_8c_a9d5aa8671cb579261b2049c09aafa773}{debug\_println}}(\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00078}00078\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00079}00079\ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00080}00080\ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00081}00081\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00082}00082\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00083}00083\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00084}00084\ \textcolor{comment}{\ *\ Allocate\ an\ integer\ cell\ representing\ this\ \`{}value`\ and\ return\ a\ cons\_pointer\ to\ it.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00085}00085\ \textcolor{comment}{\ *\ @param\ value\ an\ integer\ value;}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00086}00086\ \textcolor{comment}{\ *\ @param\ more\ \`{}NIL`,\ or\ a\ pointer\ to\ the\ more\ significant\ cell(s)\ of\ this\ number.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00087}00087\ \textcolor{comment}{\ *\ *NOTE*\ that\ if\ \`{}more`\ is\ not\ \`{}NIL`,\ \`{}value`\ *must\ not*\ exceed\ \`{}MAX\_INTEGER`.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00088}00088\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00089}\mbox{\hyperlink{integer_8c_afff1d31bb49e1be78395b0803b0b2514}{00089}}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8c_afff1d31bb49e1be78395b0803b0b2514}{make\_integer}}(\ int64\_t\ value,\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ more\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00090}00090\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ result\ =\ \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00091}00091\ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}Entering\ make\_integer\(\backslash\)n"{}},\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00092}00092\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00093}00093\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ more\ )}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00094}00094\ \ \ \ \ \ \ \ \ \ \&\&\ (\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ more\ ).payload.integer.value\ <\ 0\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00095}00095\ \ \ \ \ \ \ \ \ printf(\ \textcolor{stringliteral}{"{}WARNING:\ negative\ value\ \%"{}}\ PRId64}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00096}00096\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{stringliteral}{"{}\ passed\ as\ \`{}more`\ to\ \`{}make\_integer`\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00097}00097\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ more\ ).payload.integer.value\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00098}00098\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00099}00099\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00100}00100\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ more\ )\ ||\ \mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ more\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00101}00101\ \ \ \ \ \ \ \ \ result\ =\ \mbox{\hyperlink{conspage_8c_a04ba7c874b05e9789d0aca9ee6b106a7}{allocate\_cell}}(\ \mbox{\hyperlink{consspaceobject_8h_a4e0e4ea1576f98a0094f57bf918ded96}{INTEGERTV}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00102}00102\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__space__object}{cons\_space\_object}}\ *cell\ =\ \&\mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ result\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00103}00103\ \ \ \ \ \ \ \ \ cell-\/>\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.value\ =\ value;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00104}00104\ \ \ \ \ \ \ \ \ cell-\/>\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.more\ =\ more;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00105}00105\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00106}00106\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00107}00107\ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}make\_integer:\ returning\(\backslash\)n"{}},\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00108}00108\ \ \ \ \ \mbox{\hyperlink{debug_8c_aa0ffa929ddbce890ce4f81264a211233}{debug\_dump\_object}}(\ result,\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00109}00109\ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00110}00110\ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00111}00111\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00112}00112\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00113}00113\ \textcolor{comment}{\ *\ @brief\ Supply\ small\ valued\ integers\ from\ the\ small\ integer\ cache,\ if\ available.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00114}00114\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00115}00115\ \textcolor{comment}{\ *\ The\ pattern\ here\ is\ intended\ to\ be\ that,\ at\ least\ within\ this\ file,\ instead\ of}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00116}00116\ \textcolor{comment}{\ *\ calling\ make\_integer\ when\ an\ integer\ is\ required\ and\ dec\_ref\ when\ it's\ no\ longer\ }}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00117}00117\ \textcolor{comment}{\ *\ required,\ we\ call\ acquire\_integer\ and\ release\_integer\ respectively,\ in\ order\ to}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00118}00118\ \textcolor{comment}{\ *\ reduce\ allocation\ churn.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00119}00119\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00120}00120\ \textcolor{comment}{\ *\ In\ the\ initial\ implementation,\ acquire\_integer\ supplies\ the\ integer\ from\ the\ }}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00121}00121\ \textcolor{comment}{\ *\ small\ integer\ cache\ if\ available,\ else\ calls\ make\_integer.\ Later,\ more\ }}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00122}00122\ \textcolor{comment}{\ *\ sophisticated\ caching\ of\ integers\ which\ are\ currently\ in\ play\ may\ be\ enabled.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00123}00123\ \textcolor{comment}{\ *\ }}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00124}00124\ \textcolor{comment}{\ *\ @param\ value\ the\ value\ of\ the\ integer\ desired.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00125}00125\ \textcolor{comment}{\ *\ @param\ more\ if\ this\ value\ is\ a\ bignum,\ the\ rest\ (less\ significant\ bits)\ of\ the}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00126}00126\ \textcolor{comment}{\ *\ value.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00127}00127\ \textcolor{comment}{\ *\ @return\ struct\ cons\_pointer\ a\ pointer\ to\ the\ integer\ acquired.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00128}00128\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00129}\mbox{\hyperlink{integer_8c_adda818b0d598bdb572e371cb6d4123b4}{00129}}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8c_adda818b0d598bdb572e371cb6d4123b4}{acquire\_integer}}(\ int64\_t\ value,\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ more\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00130}00130\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ result;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00131}00131\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00132}00132\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ !\mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ more\ )\ ||\ value\ <\ 0\ ||\ value\ >=\ \mbox{\hyperlink{integer_8c_a5dacb21ddf2007d5ba24c9554e7979cd}{SMALL\_INT\_LIMIT}}\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00133}00133\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00134}00134\ \ \ \ \ \ \ \ \ \ \ \ \ (\ L\textcolor{stringliteral}{"{}acquire\_integer\ passing\ to\ make\_integer\ (outside\ small\ int\ range)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00135}00135\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00136}00136\ \ \ \ \ \ \ \ \ result\ =\ \mbox{\hyperlink{integer_8c_afff1d31bb49e1be78395b0803b0b2514}{make\_integer}}(\ value,\ more\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00137}00137\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00138}00138\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ !\mbox{\hyperlink{integer_8c_a08309d32c943a89296c8bdabe88fb6fb}{small\_int\_cache\_initialised}}\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00139}00139\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\ int64\_t\ i\ =\ 0;\ i\ <\ \mbox{\hyperlink{integer_8c_a5dacb21ddf2007d5ba24c9554e7979cd}{SMALL\_INT\_LIMIT}};\ i++\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00140}00140\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{integer_8c_a916ca64f2ce502d3f4564fa784ce6c62}{small\_int\_cache}}[i]\ =\ \mbox{\hyperlink{integer_8c_afff1d31bb49e1be78395b0803b0b2514}{make\_integer}}(\ i,\ \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00141}00141\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ \mbox{\hyperlink{integer_8c_a916ca64f2ce502d3f4564fa784ce6c62}{small\_int\_cache}}[i]\ ).count\ =\ UINT32\_MAX;\ \ \textcolor{comment}{//\ lock\ it\ in\ so\ it\ can't\ be\ GC'd}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00142}00142\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00143}00143\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{integer_8c_a08309d32c943a89296c8bdabe88fb6fb}{small\_int\_cache\_initialised}}\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00144}00144\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}small\_int\_cache\ initialised.\(\backslash\)n"{}},\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00145}00145\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00146}00146\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00147}00147\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}},\ L\textcolor{stringliteral}{"{}acquire\_integer:\ returning\ \%"{}}\ PRId64\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00148}00148\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ value\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00149}00149\ \ \ \ \ \ \ \ \ result\ =\ \mbox{\hyperlink{integer_8c_a916ca64f2ce502d3f4564fa784ce6c62}{small\_int\_cache}}[value];}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00150}00150\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00151}00151\ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00152}00152\ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00153}00153\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00154}00154\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00155}00155\ \textcolor{comment}{\ *\ @brief\ if\ the\ value\ of\ p\ is\ less\ than\ the\ size\ of\ the\ small\ integer\ cache}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00156}00156\ \textcolor{comment}{\ *\ (and\ thus\ it\ was\ presumably\ supplied\ from\ there),\ suppress\ dec\_ref.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00157}00157\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00158}00158\ \textcolor{comment}{\ *\ **NOTE\ THAT**\ at\ this\ stage\ it's\ still\ safe\ to\ dec\_ref\ an\ arbitrary\ integer,}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00159}00159\ \textcolor{comment}{\ *\ because\ those\ in\ the\ cache\ are\ locked\ and\ can't\ be\ dec\_refed.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00160}00160\ \textcolor{comment}{\ *\ }}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00161}00161\ \textcolor{comment}{\ *\ @param\ p\ a\ pointer,\ expected\ to\ be\ to\ an\ integer.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00162}00162\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00163}\mbox{\hyperlink{integer_8c_a6888967abc1be479f518354bb802d01d}{00163}}\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{integer_8c_a6888967abc1be479f518354bb802d01d}{release\_integer}}(\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ p\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00164}00164\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__space__object}{cons\_space\_object}}\ o\ =\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ p\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00165}00165\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ !\mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ p\ )\ ||\ \ \ \ \ \ \textcolor{comment}{//\ what\ I've\ been\ passed\ isn't\ an\ integer;}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00166}00166\ \ \ \ \ \ \ \ \ \ !\mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ o.\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.more\ )\ ||\ \textcolor{comment}{//\ or\ it's\ a\ bignum;}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00167}00167\ \ \ \ \ \ \ \ \ \ o.\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.value\ >=\ \mbox{\hyperlink{integer_8c_a5dacb21ddf2007d5ba24c9554e7979cd}{SMALL\_INT\_LIMIT}}\ ||\ \ \textcolor{comment}{//\ or\ it's\ bigger\ than\ the\ small\ int\ cache\ limit;}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00168}00168\ \ \ \ \ \ \ \ \ \ !\mbox{\hyperlink{equal_8c_ae8c9b7a5b6a556dbb30ae27d4c776d32}{eq}}(\ p,\ \mbox{\hyperlink{integer_8c_a916ca64f2ce502d3f4564fa784ce6c62}{small\_int\_cache}}[o.\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.value]\ )\ \textcolor{comment}{//\ or\ it's\ simply\ not\ the\ copy\ in\ the\ cache...}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00169}00169\ \ \ \ \ \ \ \ \ \ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00170}00170\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8c_aecb4a52465163e0377356bcaa85539bf}{dec\_ref}}(\ p\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00171}00171\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00172}00172\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_ab99ea81093661d24ffaaa4e85cb2387a}{DEBUG\_ALLOC}},\ L\textcolor{stringliteral}{"{}release\_integer:\ releasing\ \%"{}}\ PRId64\ \textcolor{stringliteral}{"{}\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00173}00173\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ o.\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.value\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00174}00174\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00175}00175\ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00176}00176\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00177}00177\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00178}00178\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00179}00179\ \textcolor{comment}{\ *\ @brief\ Overwrite\ the\ value\ field\ of\ the\ integer\ indicated\ by\ \`{}new`\ with}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00180}00180\ \textcolor{comment}{\ *\ the\ least\ significant\ INTEGER\_BITS\ bits\ of\ \`{}val`,\ and\ return\ the}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00181}00181\ \textcolor{comment}{\ *\ more\ significant\ bits\ (if\ any)\ right-\/shifted\ by\ INTEGER\_BITS\ places.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00182}00182\ \textcolor{comment}{\ *\ }}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00183}00183\ \textcolor{comment}{\ *\ Destructive,\ primitive,\ DO\ NOT\ USE\ in\ any\ context\ except\ primitive\ }}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00184}00184\ \textcolor{comment}{\ *\ operations\ on\ integers.\ The\ value\ passed\ as\ \`{}new`\ MUST\ be\ constructed}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00185}00185\ \textcolor{comment}{\ *\ with\ \`{}make\_integer`,\ NOT\ acquired\ with\ \`{}acquire\_integer`.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00186}00186\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00187}00187\ \textcolor{comment}{\ *\ @param\ val\ the\ value\ to\ represent;}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00188}00188\ \textcolor{comment}{\ *\ @param\ less\_significant\ the\ less\ significant\ words\ of\ this\ bignum,\ if\ any,}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00189}00189\ \textcolor{comment}{\ *\ else\ NIL;}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00190}00190\ \textcolor{comment}{\ *\ @param\ new\ a\ newly\ created\ integer,\ which\ will\ be\ destructively\ changed.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00191}00191\ \textcolor{comment}{\ *\ @return\ carry,\ if\ any,\ else\ 0.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00192}00192\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00193}\mbox{\hyperlink{integer_8c_a6ce8da41affd570e1aff4a1f95c799ac}{00193}}\ \_\_int128\_t\ \mbox{\hyperlink{integer_8c_a6ce8da41affd570e1aff4a1f95c799ac}{int128\_to\_integer}}(\ \_\_int128\_t\ val,}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00194}00194\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ less\_significant,}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00195}00195\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \textcolor{keyword}{new}\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00196}00196\ \ \ \ \ \_\_int128\_t\ carry\ =\ 0;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00197}00197\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00198}00198\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{peano_8h_a1d7315d4ead5ca96f165f5f309220e5b}{MAX\_INTEGER}}\ >=\ val\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00199}00199\ \ \ \ \ \ \ \ \ carry\ =\ 0;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00200}00200\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00201}00201\ \ \ \ \ \ \ \ \ carry\ =\ val\ \%\ \mbox{\hyperlink{peano_8h_ae4eb2d741f133542824727acb617b027}{INT\_CELL\_BASE}};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00202}00202\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00203}00203\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ L\textcolor{stringliteral}{"{}int128\_to\_integer:\ 64\ bit\ overflow;\ setting\ carry\ to\ \%ld\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00204}00204\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (\ int64\_t\ )\ carry\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00205}00205\ \ \ \ \ \ \ \ \ val\ /=\ \mbox{\hyperlink{peano_8h_ae4eb2d741f133542824727acb617b027}{INT\_CELL\_BASE}};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00206}00206\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00207}00207\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00208}00208\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__space__object}{cons\_space\_object}}\ *newc\ =\ \&\mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ \textcolor{keyword}{new}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00209}00209\ \ \ \ \ newc-\/>\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.value\ =\ (\ int64\_t\ )\ val;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00210}00210\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00211}00211\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ less\_significant\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00212}00212\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__space__object}{cons\_space\_object}}\ *lsc\ =\ \&\mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ less\_significant\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00213}00213\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8c_aa38b760ee4493c5d98400e04db3c8d47}{inc\_ref}}(\ \textcolor{keyword}{new}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00214}00214\ \ \ \ \ \ \ \ \ lsc-\/>\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.more\ =\ \textcolor{keyword}{new};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00215}00215\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00216}00216\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00217}00217\ \ \ \ \ \textcolor{keywordflow}{return}\ carry;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00218}00218\ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00219}00219\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00220}00220\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00221}00221\ \textcolor{comment}{\ *\ Return\ a\ pointer\ to\ an\ integer\ representing\ the\ sum\ of\ the\ integers}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00222}00222\ \textcolor{comment}{\ *\ pointed\ to\ by\ \`{}a`\ and\ \`{}b`.\ If\ either\ isn't\ an\ integer,\ will\ return\ nil.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00223}00223\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00224}\mbox{\hyperlink{integer_8c_a8b6e93c44eca207d8f88a71d90142bb9}{00224}}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8c_a8b6e93c44eca207d8f88a71d90142bb9}{add\_integers}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ a,}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00225}00225\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ b\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00226}00226\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ result\ =\ \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00227}00227\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ cursor\ =\ \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00228}00228\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00229}00229\ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}add\_integers:\ a\ =\ "{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00230}00230\ \ \ \ \ \mbox{\hyperlink{debug_8c_ada2d4646201b5827137d0bf053fcac59}{debug\_print\_object}}(\ a,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00231}00231\ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{};\ b\ =\ "{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00232}00232\ \ \ \ \ \mbox{\hyperlink{debug_8c_ada2d4646201b5827137d0bf053fcac59}{debug\_print\_object}}(\ b,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00233}00233\ \ \ \ \ \mbox{\hyperlink{debug_8c_a9d5aa8671cb579261b2049c09aafa773}{debug\_println}}(\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00234}00234\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00235}00235\ \ \ \ \ \_\_int128\_t\ carry\ =\ 0;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00236}00236\ \ \ \ \ \textcolor{keywordtype}{bool}\ is\_first\_cell\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00237}00237\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00238}00238\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ a\ )\ \&\&\ \mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ b\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00239}00239\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}add\_integers:\ \(\backslash\)n"{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00240}00240\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_aa0ffa929ddbce890ce4f81264a211233}{debug\_dump\_object}}(\ a,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00241}00241\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}\ plus\ \(\backslash\)n"{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00242}00242\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_aa0ffa929ddbce890ce4f81264a211233}{debug\_dump\_object}}(\ b,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00243}00243\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_a9d5aa8671cb579261b2049c09aafa773}{debug\_println}}(\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00244}00244\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00245}00245\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (\ !\mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ a\ )\ ||\ !\mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ b\ )\ ||\ carry\ !=\ 0\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00246}00246\ \ \ \ \ \ \ \ \ \ \ \ \ \_\_int128\_t\ av\ =\ \mbox{\hyperlink{integer_8c_a71d79342cc501b3e8c20b3b27ed50eb6}{cell\_value}}(\ a,\ \textcolor{charliteral}{'+'},\ is\_first\_cell\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00247}00247\ \ \ \ \ \ \ \ \ \ \ \ \ \_\_int128\_t\ bv\ =\ \mbox{\hyperlink{integer_8c_a71d79342cc501b3e8c20b3b27ed50eb6}{cell\_value}}(\ b,\ \textcolor{charliteral}{'+'},\ is\_first\_cell\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00248}00248\ \ \ \ \ \ \ \ \ \ \ \ \ \_\_int128\_t\ rv\ =\ (\ av\ +\ bv\ )\ +\ carry;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00249}00249\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00250}00250\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}add\_integers:\ av\ =\ "{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00251}00251\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_a3f7cae7c87ec9a0a47c3eebb37f7d538}{debug\_print\_128bit}}(\ av,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00252}00252\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{};\ bv\ =\ "{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00253}00253\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_a3f7cae7c87ec9a0a47c3eebb37f7d538}{debug\_print\_128bit}}(\ bv,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00254}00254\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{};\ carry\ =\ "{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00255}00255\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_a3f7cae7c87ec9a0a47c3eebb37f7d538}{debug\_print\_128bit}}(\ carry,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00256}00256\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{};\ rv\ =\ "{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00257}00257\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_a3f7cae7c87ec9a0a47c3eebb37f7d538}{debug\_print\_128bit}}(\ rv,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00258}00258\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}\(\backslash\)n"{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00259}00259\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00260}00260\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ carry\ ==\ 0\ \&\&\ (\ rv\ >=\ 0\ ||\ rv\ <\ \mbox{\hyperlink{integer_8c_a5dacb21ddf2007d5ba24c9554e7979cd}{SMALL\_INT\_LIMIT}}\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00261}00261\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ result\ =}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00262}00262\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{integer_8c_adda818b0d598bdb572e371cb6d4123b4}{acquire\_integer}}(\ (\ int64\_t\ )\ (\ rv\ \&\ 0xffffffff\ ),\ \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00263}00263\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00264}00264\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00265}00265\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ new\ =\ \mbox{\hyperlink{integer_8c_afff1d31bb49e1be78395b0803b0b2514}{make\_integer}}(\ 0,\ \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00266}00266\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ carry\ =\ \mbox{\hyperlink{integer_8c_a6ce8da41affd570e1aff4a1f95c799ac}{int128\_to\_integer}}(\ rv,\ cursor,\ \textcolor{keyword}{new}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00267}00267\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cursor\ =\ \textcolor{keyword}{new};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00268}00268\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00269}00269\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ result\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00270}00270\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ result\ =\ cursor;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00271}00271\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00272}00272\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00273}00273\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ a\ =\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ a\ ).payload.integer.more;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00274}00274\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ b\ =\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ b\ ).payload.integer.more;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00275}00275\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ is\_first\_cell\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00276}00276\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00277}00277\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00278}00278\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00279}00279\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00280}00280\ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}add\_integers\ returning:\ "{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00281}00281\ \ \ \ \ \mbox{\hyperlink{debug_8c_ada2d4646201b5827137d0bf053fcac59}{debug\_print\_object}}(\ result,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00282}00282\ \ \ \ \ \mbox{\hyperlink{debug_8c_a9d5aa8671cb579261b2049c09aafa773}{debug\_println}}(\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00283}00283\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00284}00284\ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00285}00285\ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00286}00286\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00287}00287\ \textcolor{comment}{//\ TODO:\ I\ have\ really\ no\ idea\ what\ I\ was\ trying\ to\ do\ here,\ or\ why\ it\ could\ possibly\ be\ a\ good\ idea.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00288}\mbox{\hyperlink{integer_8c_ae56ef795db55d248345bb3809e6781fb}{00288}}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8c_ae56ef795db55d248345bb3809e6781fb}{base\_partial}}(\ int\ depth\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00289}00289\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ result\ =\ \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00290}00290\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00291}00291\ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}},\ L\textcolor{stringliteral}{"{}base\_partial:\ depth\ =\ \%d\(\backslash\)n"{}},\ depth\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00292}00292\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00293}00293\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ depth;\ i++\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00294}00294\ \ \ \ \ \ \ \ \ result\ =\ \mbox{\hyperlink{integer_8c_adda818b0d598bdb572e371cb6d4123b4}{acquire\_integer}}(\ 0,\ result\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00295}00295\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00296}00296\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00297}00297\ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00298}00298\ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00299}00299\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00300}00300\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00301}00301\ \textcolor{comment}{\ *\ @brief\ Return\ a\ copy\ of\ this\ \`{}partial`\ with\ this\ \`{}digit`\ appended.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00302}00302\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00303}00303\ \textcolor{comment}{\ *\ @param\ partial\ the\ more\ significant\ bits\ of\ a\ possible\ bignum.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00304}00304\ \textcolor{comment}{\ *\ @param\ digit\ the\ less\ significant\ bits\ of\ that\ possible\ bignum.\ NOTE:\ the}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00305}00305\ \textcolor{comment}{\ *\ name\ \`{}digit`\ is\ technically\ correct\ but\ possibly\ misleading,\ because\ the}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00306}00306\ \textcolor{comment}{\ *\ numbering\ system\ here\ is\ base\ INT\_CELL\_BASE,\ currently\ x0fffffffffffffffL}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00307}00307\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00308}\mbox{\hyperlink{integer_8c_a05f136019ab7450d6cf4f2bb7d79f7cc}{00308}}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8c_a05f136019ab7450d6cf4f2bb7d79f7cc}{append\_cell}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ partial,}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00309}00309\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ digit\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00310}00310\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__space__object}{cons\_space\_object}}\ cell\ =\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ partial\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00311}00311\ \ \ \ \ \textcolor{comment}{//\ TODO:\ I\ should\ recursively\ copy\ the\ whole\ bignum\ chain,\ because}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00312}00312\ \ \ \ \ \textcolor{comment}{//\ we're\ still\ destructively\ modifying\ the\ end\ of\ it.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00313}00313\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ c\ =\ \mbox{\hyperlink{integer_8c_afff1d31bb49e1be78395b0803b0b2514}{make\_integer}}(\ cell.\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.value,}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00314}00314\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ cell.\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.more\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00315}00315\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ result\ =\ partial;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00316}00316\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00317}00317\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ partial\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00318}00318\ \ \ \ \ \ \ \ \ result\ =\ digit;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00319}00319\ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00320}00320\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ find\ the\ last\ digit\ in\ the\ chain...}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00321}00321\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (\ !\mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ c\ ).payload.integer.more\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00322}00322\ \ \ \ \ \ \ \ \ \ \ \ \ c\ =\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ c\ ).payload.integer.more;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00323}00323\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00324}00324\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00325}00325\ \ \ \ \ \ \ \ \ (\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ c\ )\ ).payload.integer.more\ =\ digit;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00326}00326\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00327}00327\ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00328}00328\ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00329}00329\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00330}00330\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00331}00331\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00332}00332\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00333}00333\ \textcolor{comment}{\ *\ Return\ a\ pointer\ to\ an\ integer\ representing\ the\ product\ of\ the\ integers}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00334}00334\ \textcolor{comment}{\ *\ pointed\ to\ by\ \`{}a`\ and\ \`{}b`.\ If\ either\ isn't\ an\ integer,\ will\ return\ nil.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00335}00335\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00336}00336\ \textcolor{comment}{\ *\ Yes,\ this\ is\ one\ of\ Muhammad\ ibn\ Musa\ al-\/Khwarizmi's\ original\ recipes,\ so}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00337}00337\ \textcolor{comment}{\ *\ you'd\ think\ it\ would\ be\ easy;\ the\ reason\ that\ each\ step\ is\ documented\ is}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00338}00338\ \textcolor{comment}{\ *\ because\ I\ did\ not\ find\ it\ so.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00339}00339\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00340}00340\ \textcolor{comment}{\ *\ @param\ a\ an\ integer;}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00341}00341\ \textcolor{comment}{\ *\ @param\ b\ an\ integer.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00342}00342\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00343}\mbox{\hyperlink{integer_8c_a3f0fcaa092a0c6830aa0bf7303ed1f7c}{00343}}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8c_a3f0fcaa092a0c6830aa0bf7303ed1f7c}{multiply\_integers}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ a,}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00344}00344\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ b\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00345}00345\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ result\ =\ \mbox{\hyperlink{integer_8c_adda818b0d598bdb572e371cb6d4123b4}{acquire\_integer}}(\ 0,\ \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00346}00346\ \ \ \ \ \textcolor{keywordtype}{bool}\ neg\ =\ \mbox{\hyperlink{peano_8c_a55136259512dc90fc104a2670505f172}{is\_negative}}(\ a\ )\ !=\ \mbox{\hyperlink{peano_8c_a55136259512dc90fc104a2670505f172}{is\_negative}}(\ b\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00347}00347\ \ \ \ \ \textcolor{keywordtype}{bool}\ is\_first\_b\ =\ \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00348}00348\ \ \ \ \ \textcolor{keywordtype}{int}\ i\ =\ 0;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00349}00349\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00350}00350\ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}multiply\_integers:\ a\ =\ "{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00351}00351\ \ \ \ \ \mbox{\hyperlink{debug_8c_ada2d4646201b5827137d0bf053fcac59}{debug\_print\_object}}(\ a,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00352}00352\ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{};\ b\ =\ "{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00353}00353\ \ \ \ \ \mbox{\hyperlink{debug_8c_ada2d4646201b5827137d0bf053fcac59}{debug\_print\_object}}(\ b,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00354}00354\ \ \ \ \ \mbox{\hyperlink{debug_8c_a9d5aa8671cb579261b2049c09aafa773}{debug\_println}}(\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00355}00355\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00356}00356\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ a\ )\ \&\&\ \mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ b\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00357}00357\ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ for\ each\ digit\ in\ a,\ starting\ with\ the\ least\ significant\ (ai)\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00358}00358\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00359}00359\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ ai\ =\ a;\ !\mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ ai\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00360}00360\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ai\ =\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ ai\ ).payload.integer.more\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00361}00361\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ set\ carry\ to\ 0\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00362}00362\ \ \ \ \ \ \ \ \ \ \ \ \ \_\_int128\_t\ carry\ =\ 0;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00363}00363\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00364}00364\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ set\ least\ significant\ digits\ for\ result\ ri\ for\ this\ iteration}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00365}00365\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ *\ to\ i\ zeros\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00366}00366\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ ri\ =\ \mbox{\hyperlink{integer_8c_ae56ef795db55d248345bb3809e6781fb}{base\_partial}}(\ i++\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00367}00367\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00368}00368\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ for\ each\ digit\ in\ b,\ starting\ with\ the\ least\ significant\ (bj)\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00369}00369\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ bj\ =\ b;\ !\mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ bj\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00370}00370\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ bj\ =\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ bj\ ).payload.integer.more\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00371}00371\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00372}00372\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00373}00373\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ L\textcolor{stringliteral}{"{}multiply\_integers:\ a[i]\ =\ \%Ld,\ b[j]\ =\ \%Ld,\ i\ =\ \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00374}00374\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ ai\ ).payload.integer.value,}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00375}00375\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ bj\ ).payload.integer.value,\ i\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00376}00376\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00377}00377\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ multiply\ ai\ with\ bj\ and\ add\ the\ carry,\ resulting\ in\ a}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00378}00378\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *\ value\ xj\ which\ may\ exceed\ one\ digit\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00379}00379\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \_\_int128\_t\ xj\ =\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ ai\ ).payload.integer.value\ *}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00380}00380\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ bj\ ).payload.integer.value;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00381}00381\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ xj\ +=\ carry;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00382}00382\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00383}00383\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ if\ xj\ exceeds\ one\ digit,\ break\ it\ into\ the\ digit\ dj\ and}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00384}00384\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *\ the\ carry\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00385}00385\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ carry\ =\ xj\ >>\ \mbox{\hyperlink{peano_8h_affebeb503d1bd3d7aaa35b44668a34b6}{INTEGER\_BIT\_SHIFT}};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00386}00386\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ dj\ =}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00387}00387\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{integer_8c_adda818b0d598bdb572e371cb6d4123b4}{acquire\_integer}}(\ xj\ \&\ \mbox{\hyperlink{peano_8h_a1d7315d4ead5ca96f165f5f309220e5b}{MAX\_INTEGER}},\ \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00388}00388\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00389}00389\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{integer_8h_abd52227553bbbee425221af07e95700e}{replace\_integer\_p}}(\ ri,\ \mbox{\hyperlink{integer_8c_a05f136019ab7450d6cf4f2bb7d79f7cc}{append\_cell}}(\ ri,\ dj\ )\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00390}00390\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ struct\ cons\_pointer\ new\_ri\ =\ append\_cell(\ ri,\ dj\ );}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00391}00391\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ release\_integer(\ ri);\ }}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00392}00392\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ ri\ =\ new\_ri;}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00393}00393\ \ \ \ \ \ \ \ \ \ \ \ \ \}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ end\ for\ bj\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00394}00394\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00395}00395\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ if\ carry\ is\ not\ equal\ to\ zero,\ append\ it\ as\ a\ final\ cell}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00396}00396\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ *\ to\ ri\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00397}00397\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ carry\ !=\ 0\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00398}00398\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{integer_8h_a440ee14fe90f597a6845c227e1420c0f}{replace\_integer\_i}}(\ ri,\ carry\ )}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00399}00399\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00400}00400\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00401}00401\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ add\ ri\ to\ result\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00402}00402\ \ \ \ \ \ \ \ \ \ \ \ \ result\ =\ \mbox{\hyperlink{integer_8c_a8b6e93c44eca207d8f88a71d90142bb9}{add\_integers}}(\ result,\ ri\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00403}00403\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00404}00404\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}multiply\_integers:\ result\ is\ "{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00405}00405\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ada2d4646201b5827137d0bf053fcac59}{debug\_print\_object}}(\ result,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00406}00406\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_a9d5aa8671cb579261b2049c09aafa773}{debug\_println}}(\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00407}00407\ \ \ \ \ \ \ \ \ \}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ end\ for\ ai\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00408}00408\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00409}00409\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00410}00410\ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{}multiply\_integers\ returning:\ "{}},\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00411}00411\ \ \ \ \ \mbox{\hyperlink{debug_8c_ada2d4646201b5827137d0bf053fcac59}{debug\_print\_object}}(\ result,\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00412}00412\ \ \ \ \ \mbox{\hyperlink{debug_8c_a9d5aa8671cb579261b2049c09aafa773}{debug\_println}}(\ \mbox{\hyperlink{debug_8h_a31067039d5f8f06bec3f2f94af168ed5}{DEBUG\_ARITH}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00413}00413\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00414}00414\ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00415}00415\ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00416}00416\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00417}00417\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00418}00418\ \textcolor{comment}{\ *\ don't\ use;\ private\ to\ integer\_to\_string,\ and\ somewhat\ dodgy.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00419}00419\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00420}\mbox{\hyperlink{integer_8c_adcc5e7c527d7d2e3094ddaa3d092d429}{00420}}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8c_adcc5e7c527d7d2e3094ddaa3d092d429}{integer\_to\_string\_add\_digit}}(\ int\ digit,\ int\ digits,}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00421}00421\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ tail\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00422}00422\ \ \ \ \ wint\_t\ character\ =\ btowc(\ \mbox{\hyperlink{integer_8c_a60dbddf98757946e2eafa70b4ea3d456}{hex\_digits}}[digit]\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00423}00423\ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_aa1b2b9f2886a468441606f89913c0c59}{DEBUG\_IO}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00424}00424\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ L\textcolor{stringliteral}{"{}integer\_to\_string\_add\_digit:\ digit\ is\ \%d,\ digits\ is\ \%d;\ returning:\ "{}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00425}00425\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ digit,\ digits\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00426}00426\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ r\ =}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00427}00427\ \ \ \ \ \ \ \ \ (\ digits\ \%\ 3\ ==\ 0\ )\ ?\ \mbox{\hyperlink{consspaceobject_8h_a6e09249d678524caf40f18ac273c8157}{make\_string}}(\ L\textcolor{charliteral}{','},\ \mbox{\hyperlink{consspaceobject_8h_a6e09249d678524caf40f18ac273c8157}{make\_string}}(\ character,}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00428}00428\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ tail\ )\ )\ :}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00429}00429\ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_a6e09249d678524caf40f18ac273c8157}{make\_string}}(\ character,\ tail\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00430}00430\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00431}00431\ \ \ \ \ \mbox{\hyperlink{debug_8c_ada2d4646201b5827137d0bf053fcac59}{debug\_print\_object}}(\ r,\ \mbox{\hyperlink{debug_8h_aa1b2b9f2886a468441606f89913c0c59}{DEBUG\_IO}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00432}00432\ \ \ \ \ \mbox{\hyperlink{debug_8c_a9d5aa8671cb579261b2049c09aafa773}{debug\_println}}(\ \mbox{\hyperlink{debug_8h_aa1b2b9f2886a468441606f89913c0c59}{DEBUG\_IO}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00433}00433\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00434}00434\ \ \ \ \ \textcolor{keywordflow}{return}\ r;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00435}00435\ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00436}00436\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00437}00437\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00438}00438\ \textcolor{comment}{\ *\ @brief\ return\ a\ string\ representation\ of\ this\ integer,\ which\ may\ be\ a}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00439}00439\ \textcolor{comment}{\ *\ bignum.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00440}00440\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00441}00441\ \textcolor{comment}{\ *\ The\ general\ principle\ of\ printing\ a\ bignum\ is\ that\ you\ print\ the\ least}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00442}00442\ \textcolor{comment}{\ *\ significant\ digit\ in\ whatever\ base\ you're\ dealing\ with,\ divide\ through}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00443}00443\ \textcolor{comment}{\ *\ by\ the\ base,\ print\ the\ next,\ and\ carry\ on\ until\ you've\ none\ left.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00444}00444\ \textcolor{comment}{\ *\ Obviously,\ that\ means\ you\ print\ from\ right\ to\ left.\ Given\ that\ we\ build}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00445}00445\ \textcolor{comment}{\ *\ strings\ from\ right\ to\ left,\ 'printing'\ an\ integer\ to\ a\ lisp\ string}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00446}00446\ \textcolor{comment}{\ *\ would\ seem\ reasonably\ easy.\ The\ problem\ is\ when\ you\ jump\ from\ one\ integer}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00447}00447\ \textcolor{comment}{\ *\ object\ to\ the\ next.\ 64\ bit\ integers\ don't\ align\ with\ decimal\ numbers,\ so}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00448}00448\ \textcolor{comment}{\ *\ when\ we\ get\ to\ the\ last\ digit\ from\ one\ integer\ cell,\ we\ have\ potentially}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00449}00449\ \textcolor{comment}{\ *\ to\ be\ looking\ to\ the\ next.\ H'mmmm.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00450}00450\ \textcolor{comment}{\ *}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00451}00451\ \textcolor{comment}{\ *\ @param\ int\_pointer\ cons\_pointer\ to\ the\ integer\ to\ print,}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00452}00452\ \textcolor{comment}{\ *\ @param\ base\ the\ base\ to\ print\ it\ in.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00453}00453\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00454}\mbox{\hyperlink{integer_8c_aa9d39b6446057bc1edc01113f67db026}{00454}}\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ \mbox{\hyperlink{integer_8c_aa9d39b6446057bc1edc01113f67db026}{integer\_to\_string}}(\ struct\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ int\_pointer,}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00455}00455\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ int\ base\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00456}00456\ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ result\ =\ \mbox{\hyperlink{consspaceobject_8h_a263efce0e5cda1d387a1a43f94715445}{NIL}};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00457}00457\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00458}00458\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ int\_pointer\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00459}00459\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ next\ =}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00460}00460\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ int\_pointer\ ).payload.integer.more;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00461}00461\ \ \ \ \ \ \ \ \ \_\_int128\_t\ accumulator\ =}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00462}00462\ \ \ \ \ \ \ \ \ \ \ \ \ llabs(\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ int\_pointer\ ).payload.integer.value\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00463}00463\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{peano_8c_a55136259512dc90fc104a2670505f172}{is\_negative}}\ =}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00464}00464\ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ int\_pointer\ ).payload.integer.value\ <\ 0;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00465}00465\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ digits\ =\ 0;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00466}00466\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00467}00467\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ accumulator\ ==\ 0\ \&\&\ \mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ next\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00468}00468\ \ \ \ \ \ \ \ \ \ \ \ \ result\ =\ \mbox{\hyperlink{consspaceobject_8h_a9e4202c8555763ca9a119f0d63a058cd}{c\_string\_to\_lisp\_string}}(\ L\textcolor{stringliteral}{"{}0"{}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00469}00469\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00470}00470\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{while}\ (\ accumulator\ >\ 0\ ||\ !\mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ next\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00471}00471\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ accumulator\ <\ \mbox{\hyperlink{peano_8h_a1d7315d4ead5ca96f165f5f309220e5b}{MAX\_INTEGER}}\ \&\&\ !\mbox{\hyperlink{consspaceobject_8h_a758a42bfac22caaf66e29c666c91702d}{nilp}}(\ next\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00472}00472\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ accumulator\ +=}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00473}00473\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ next\ ).payload.integer.value\ \%}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00474}00474\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{peano_8h_ae4eb2d741f133542824727acb617b027}{INT\_CELL\_BASE}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00475}00475\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ next\ =\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ next\ ).payload.integer.more;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00476}00476\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00477}00477\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{consspaceobject_8h_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}\ =\ (\ int\ )\ (\ accumulator\ \%\ base\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00478}00478\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_aa335b357cde1ba7eb6e8a71955079aab}{debug\_printf}}(\ \mbox{\hyperlink{debug_8h_aa1b2b9f2886a468441606f89913c0c59}{DEBUG\_IO}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00479}00479\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ L\textcolor{stringliteral}{"{}integer\_to\_string:\ digit\ is\ \%ld,\ hexadecimal\ is\ \%c,\ accumulator\ is:\ "{}},}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00480}00480\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{consspaceobject_8h_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}},\ \mbox{\hyperlink{integer_8c_a60dbddf98757946e2eafa70b4ea3d456}{hex\_digits}}[\mbox{\hyperlink{consspaceobject_8h_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}}]\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00481}00481\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_a3f7cae7c87ec9a0a47c3eebb37f7d538}{debug\_print\_128bit}}(\ accumulator,\ \mbox{\hyperlink{debug_8h_aa1b2b9f2886a468441606f89913c0c59}{DEBUG\_IO}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00482}00482\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ad55e4f61e076944d705d98b5314c5181}{debug\_print}}(\ L\textcolor{stringliteral}{"{};\ result\ is:\ "{}},\ \mbox{\hyperlink{debug_8h_aa1b2b9f2886a468441606f89913c0c59}{DEBUG\_IO}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00483}00483\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_ada2d4646201b5827137d0bf053fcac59}{debug\_print\_object}}(\ result,\ \mbox{\hyperlink{debug_8h_aa1b2b9f2886a468441606f89913c0c59}{DEBUG\_IO}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00484}00484\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{debug_8c_a9d5aa8671cb579261b2049c09aafa773}{debug\_println}}(\ \mbox{\hyperlink{debug_8h_aa1b2b9f2886a468441606f89913c0c59}{DEBUG\_IO}}\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00485}00485\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00486}00486\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ result\ =}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00487}00487\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{integer_8c_adcc5e7c527d7d2e3094ddaa3d092d429}{integer\_to\_string\_add\_digit}}(\ \mbox{\hyperlink{consspaceobject_8h_a894bdfa2d603d8343f8ef01dda6fcd23}{offset}},\ ++digits,\ result\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00488}00488\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ accumulator\ =\ accumulator\ /\ base;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00489}00489\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00490}00490\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00491}00491\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{consspaceobject_8h_ab57f7feed314b0b9efa64d4cb3102759}{stringp}}(\ result\ )}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00492}00492\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \&\&\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ result\ ).payload.string.character\ ==\ L\textcolor{charliteral}{','}\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00493}00493\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{/*\ if\ the\ number\ of\ digits\ in\ the\ string\ is\ divisible\ by\ 3,\ there\ will\ be}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00494}00494\ \textcolor{comment}{\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *\ an\ unwanted\ comma\ on\ the\ front.\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00495}00495\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ result\ =\ \mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ result\ ).payload.string.cdr;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00496}00496\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00497}00497\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00498}00498\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00499}00499\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{peano_8c_a55136259512dc90fc104a2670505f172}{is\_negative}}\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00500}00500\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ result\ =\ \mbox{\hyperlink{consspaceobject_8h_a6e09249d678524caf40f18ac273c8157}{make\_string}}(\ L\textcolor{charliteral}{'-\/'},\ result\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00501}00501\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00502}00502\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00503}00503\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00504}00504\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00505}00505\ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00506}00506\ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00507}00507\ \textcolor{comment}{}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00508}00508\ \textcolor{comment}{/**}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00509}00509\ \textcolor{comment}{\ *\ true\ if\ a\ and\ be\ are\ both\ integers\ whose\ value\ is\ the\ same\ value.}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00510}00510\ \textcolor{comment}{\ */}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00511}\mbox{\hyperlink{integer_8c_a10c7e3258f3c46d3271301a7092fc52e}{00511}}\ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{integer_8c_a10c7e3258f3c46d3271301a7092fc52e}{equal\_integer\_integer}}(\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ a,\ \textcolor{keyword}{struct}\ \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\_pointer}}\ b\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00512}00512\ \ \ \ \ \textcolor{keywordtype}{bool}\ result\ =\ \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00513}00513\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00514}00514\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ \mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ a\ )\ \&\&\ \mbox{\hyperlink{consspaceobject_8h_af99c355c0b2f78228a1e9e4e68dcfe76}{integerp}}(\ b\ )\ )\ \{}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00515}00515\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__space__object}{cons\_space\_object}}\ *cell\_a\ =\ \&\mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ a\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00516}00516\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\mbox{\hyperlink{consspaceobject_8h_structcons__space__object}{cons\_space\_object}}\ *cell\_b\ =\ \&\mbox{\hyperlink{consspaceobject_8h_af31e1da9438d7ae4410864ecc901b131}{pointer2cell}}(\ b\ );}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00517}00517\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00518}00518\ \ \ \ \ \ \ \ \ result\ =}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00519}00519\ \ \ \ \ \ \ \ \ \ \ \ \ cell\_a-\/>\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.value\ ==\ cell\_b-\/>\mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{payload}}.integer.value;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00520}00520\ \ \ \ \ \}}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00521}00521\ }
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00522}00522\ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{\Hypertarget{integer_8c_source_l00523}00523\ \}}

\end{DoxyCode}
