#include <OOC/Doc.d>
#include <__oo2c.h>
#include <setjmp.h>

void OOC_Doc__SetPosition(struct OOC_Doc__Position *pos, RT0__Struct pos__tag, OOC_INT32 _char, OOC_INT32 line, OOC_INT32 column) {
  register OOC_INT64 i0;

  i0 = _char;
  *(OOC_INT32*)(OOC_INT64)pos = i0;
  i0 = line;
  *(OOC_INT32*)((OOC_INT64)pos+4) = i0;
  i0 = column;
  *(OOC_INT32*)((OOC_INT64)pos+8) = i0;
  return;
  ;
}

static void OOC_Doc__InitElement(OOC_Doc__Element e) {
  register OOC_INT64 i0;

  i0 = (OOC_INT64)e;
  *(OOC_INT32*)(_check_pointer(i0, 6771)) = (-1);
  *(OOC_INT32*)((_check_pointer(i0, 6795))+4) = (-1);
  *(OOC_INT32*)((_check_pointer(i0, 6819))+8) = (-1);
  return;
  ;
}

void OOC_Doc__ElementDesc_NodeName(OOC_Doc__Element e, OOC_CHAR8 name[], OOC_LEN name_0d) {

  return;
  ;
}

void OOC_Doc__ElementDesc_Normalize(OOC_Doc__Element e) {

  return;
  ;
}

void OOC_Doc__ElementDesc_Store(OOC_Doc__Element e, ADT_Storable__Writer w) {

  return;
  ;
}

void OOC_Doc__ElementDesc_Load(OOC_Doc__Element e, ADT_Storable__Reader r) {
  register OOC_INT64 i0;

  i0 = (OOC_INT64)e;
  OOC_Doc__InitElement((OOC_Doc__Element)i0);
  return;
  ;
}

void OOC_Doc__MergeInline(OOC_Doc__InlineElement *dest, OOC_Doc__InlineElement src) {
  register OOC_INT64 i0,i1;
  OOC_Doc__InlineElement i;

  i0 = (OOC_INT64)*dest;
  i1 = i0==(OOC_INT64)0;
  if (i1) goto l12;
  i = (OOC_Doc__InlineElement)i0;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 7531))+16);
  i1 = i1!=(OOC_INT64)0;
  if (!i1) goto l11;
l6_loop:
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 7568))+16);
  i = (OOC_Doc__InlineElement)i0;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 7531))+16);
  i1 = i1!=(OOC_INT64)0;
  if (i1) goto l6_loop;
l11:
  i1 = (OOC_INT64)src;
  *(OOC_INT64*)((_check_pointer(i0, 7599))+16) = i1;
  goto l13;
l12:
  i0 = (OOC_INT64)src;
  *dest = (OOC_Doc__InlineElement)i0;
l13:
  return;
  ;
}

static void OOC_Doc__InitInlineElement(OOC_Doc__InlineElement e) {
  register OOC_INT64 i0;

  i0 = (OOC_INT64)e;
  OOC_Doc__InitElement((OOC_Doc__Element)i0);
  *(OOC_INT64*)((_check_pointer(i0, 7729))+16) = (OOC_INT64)0;
  return;
  ;
}

void OOC_Doc__InlineElementDesc_StripHeadWS(OOC_Doc__InlineElement e) {

  return;
  ;
}

void OOC_Doc__InlineElementDesc_StripTailWS(OOC_Doc__InlineElement e) {

  return;
  ;
}

void OOC_Doc__InlineElementDesc_Store(OOC_Doc__InlineElement e, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)e;
  i1 = (OOC_INT64)w;
  OOC_Doc__ElementDesc_Store((OOC_Doc__Element)i0, (ADT_Storable__Writer)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 8021))+16);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 8005)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__InlineElementDesc_Load(OOC_Doc__InlineElement e, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2;
  Object__Object obj;

  i0 = (OOC_INT64)e;
  i1 = (OOC_INT64)r;
  OOC_Doc__ElementDesc_Load((OOC_Doc__Element)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 8183)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 8270))+16) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 8290)))), &_td_OOC_Doc__InlineElementDesc, 8290));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 8234))+16) = (OOC_INT64)0;
l4:
  return;
  ;
}

static void OOC_Doc__InitBlockElement(OOC_Doc__BlockElement e, OOC_CHAR8 padAfter) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)e;
  OOC_Doc__InitElement((OOC_Doc__Element)i0);
  *(OOC_INT64*)((_check_pointer(i0, 8427))+16) = (OOC_INT64)0;
  i1 = padAfter;
  *(OOC_UINT8*)((_check_pointer(i0, 8452))+24) = i1;
  return;
  ;
}

void OOC_Doc__BlockElementDesc_Store(OOC_Doc__BlockElement e, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)e;
  i1 = (OOC_INT64)w;
  OOC_Doc__ElementDesc_Store((OOC_Doc__Element)i0, (ADT_Storable__Writer)i1);
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 8621))+16);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 8605)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i2);
  i0 = *(OOC_UINT8*)((_check_pointer(i0, 8654))+24);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 8640)))), IO_BinaryRider__WriterDesc_WriteBool)),IO_BinaryRider__WriterDesc_WriteBool)((IO_BinaryRider__Writer)i1, i0);
  return;
  ;
}

void OOC_Doc__BlockElementDesc_Load(OOC_Doc__BlockElement e, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2,i3;
  Object__Object obj;

  i0 = (OOC_INT64)e;
  i1 = (OOC_INT64)r;
  OOC_Doc__ElementDesc_Load((OOC_Doc__Element)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 8813)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i2 = (OOC_INT64)obj;
  i3 = i2==(OOC_INT64)0;
  if (i3) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 8899))+16) = (_type_guard(i2, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 8918)))), &_td_OOC_Doc__BlockElementDesc, 8918));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 8864))+16) = (OOC_INT64)0;
l4:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 8946)))), IO_BinaryRider__ReaderDesc_ReadBool)),IO_BinaryRider__ReaderDesc_ReadBool)((IO_BinaryRider__Reader)i1, (void*)((_check_pointer(i0, 8959))+24));
  return;
  ;
}

static void OOC_Doc__NormalizeBlockList(OOC_Doc__BlockElement blockList) {
  register OOC_INT64 i0,i1;
  OOC_Doc__BlockElement block;

  i0 = (OOC_INT64)blockList;
  block = (OOC_Doc__BlockElement)i0;
  i1 = i0!=(OOC_INT64)0;
  if (!i1) goto l8;
  
l3_loop:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 9265)))), OOC_Doc__ElementDesc_Normalize)),OOC_Doc__ElementDesc_Normalize)((OOC_Doc__Element)i0);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 9298))+16);
  block = (OOC_Doc__BlockElement)i0;
  i1 = i0!=(OOC_INT64)0;
  if (i1) goto l3_loop;
l8:
  return;
  ;
}

static void OOC_Doc__NoPadLastElement(OOC_Doc__BlockElement list) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)list;
  i1 = i0!=(OOC_INT64)0;
  if (!i1) goto l12;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 9444))+16);
  i1 = i1!=(OOC_INT64)0;
  if (!i1) goto l11;
l6_loop:
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 9486))+16);
  list = (OOC_Doc__BlockElement)i0;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 9444))+16);
  i1 = i1!=(OOC_INT64)0;
  if (i1) goto l6_loop;
l11:
  *(OOC_UINT8*)((_check_pointer(i0, 9519))+24) = 0u;
l12:
  return;
  ;
}

OOC_Doc__InlineList OOC_Doc__NewInlineList(void) {
  register OOC_INT64 i0;
  OOC_Doc__InlineList il;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__InlineList.baseTypes[0]);
  il = (OOC_Doc__InlineList)i0;
  *(OOC_INT64*)(_check_pointer(i0, 9671)) = 0;
  *(OOC_INT64*)((_check_pointer(i0, 9692))+8) = 0;
  return (OOC_Doc__InlineList)i0;
  ;
}

void OOC_Doc__InlineListDesc_Append(OOC_Doc__InlineList il, OOC_Doc__InlineElement inlineElement) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)inlineElement;
  *(OOC_INT64*)((_check_pointer(i0, 9835))+16) = (OOC_INT64)0;
  i1 = (OOC_INT64)il;
  i2 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i1, 9866));
  i2 = i2==(OOC_INT64)0;
  if (i2) goto l3;
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i1, 9934))+8);
  *(OOC_INT64*)((_check_pointer(i2, 9940))+16) = i0;
  goto l4;
l3:
  *(OOC_INT64*)(_check_pointer(i1, 9893)) = i0;
l4:
  *(OOC_INT64*)((_check_pointer(i1, 9985))+8) = i0;
  return;
  ;
}

OOC_Doc__BlockList OOC_Doc__NewBlockList(void) {
  register OOC_INT64 i0;
  OOC_Doc__BlockList bl;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__BlockList.baseTypes[0]);
  bl = (OOC_Doc__BlockList)i0;
  *(OOC_INT64*)(_check_pointer(i0, 10116)) = 0;
  *(OOC_INT64*)((_check_pointer(i0, 10137))+8) = 0;
  return (OOC_Doc__BlockList)i0;
  ;
}

void OOC_Doc__BlockListDesc_Append(OOC_Doc__BlockList bl, OOC_Doc__BlockElement inlineElement) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)inlineElement;
  *(OOC_INT64*)((_check_pointer(i0, 10277))+16) = (OOC_INT64)0;
  i1 = (OOC_INT64)bl;
  i2 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i1, 10307));
  i2 = i2==(OOC_INT64)0;
  if (i2) goto l3;
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i1, 10375))+8);
  *(OOC_INT64*)((_check_pointer(i2, 10381))+16) = i0;
  goto l4;
l3:
  *(OOC_INT64*)(_check_pointer(i1, 10334)) = i0;
l4:
  *(OOC_INT64*)((_check_pointer(i1, 10425))+8) = i0;
  return;
  ;
}

static void OOC_Doc__NormalizeInlineList(OOC_Doc__InlineElement *blockList) {
  register OOC_INT64 i0,i1,i2,i3;
  OOC_Doc__InlineElement prev;
  OOC_Doc__InlineElement i;

  prev = (OOC_Doc__InlineElement)(OOC_INT64)0;
  i0 = (OOC_INT64)*blockList;
  i = (OOC_Doc__InlineElement)i0;
  i1 = i0!=(OOC_INT64)0;
  if (!i1) goto l19;
  i1=(OOC_INT64)0;i2=1u;
l3_loop:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 10636)))), OOC_Doc__ElementDesc_Normalize)),OOC_Doc__ElementDesc_Normalize)((OOC_Doc__Element)i0);
  i3 = OOC_TYPE_TEST(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 10661)))), &_td_OOC_Doc__TextDesc);
  if (i3) goto l6;
  i3=0u;
  goto l8;
l6:
  i3 = (OOC_INT64)*(OOC_INT64*)((_check_pointer((_type_guard(i0, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 10675)))), &_td_OOC_Doc__TextDesc, 10675)), 10680))+24);
  i3 = (
  _cmp8((const void*)(_check_pointer(i3, 10688)),(const void*)""))==0;
  
l8:
  if (i3) goto l10;
  prev = (OOC_Doc__InlineElement)i0;
  i1 = i0==(OOC_INT64)0;
  i2=i1;i1=i0;
  goto l14;
l10:
  if (i2) goto l12;
  i3 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 11018))+16);
  *(OOC_INT64*)((_check_pointer(i1, 11001))+16) = i3;
  goto l14;
l12:
  i3 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 10961))+16);
  *blockList = (OOC_Doc__InlineElement)i3;
l14:
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 11095))+16);
  i = (OOC_Doc__InlineElement)i0;
  i3 = i0!=(OOC_INT64)0;
  if (i3) goto l3_loop;
l19:
  return;
  ;
}

static OOC_Doc__InlineElement OOC_Doc__LastInlineElement(OOC_Doc__InlineElement inlineList) {
  register OOC_INT64 i0,i1;
  OOC_Doc__InlineElement last;

  i0 = (OOC_INT64)inlineList;
  last = (OOC_Doc__InlineElement)i0;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 11294))+16);
  i1 = i1!=(OOC_INT64)0;
  if (!i1) goto l9;
l4_loop:
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 11335))+16);
  last = (OOC_Doc__InlineElement)i0;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 11294))+16);
  i1 = i1!=(OOC_INT64)0;
  if (i1) goto l4_loop;
l9:
  return (OOC_Doc__InlineElement)i0;
  ;
}

static OOC_Doc__BlockElement OOC_Doc__LastBlockElement(OOC_Doc__BlockElement blockList) {
  register OOC_INT64 i0,i1;
  OOC_Doc__BlockElement last;

  i0 = (OOC_INT64)blockList;
  last = (OOC_Doc__BlockElement)i0;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 11543))+16);
  i1 = i1!=(OOC_INT64)0;
  if (!i1) goto l9;
l4_loop:
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 11583))+16);
  last = (OOC_Doc__BlockElement)i0;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 11543))+16);
  i1 = i1!=(OOC_INT64)0;
  if (i1) goto l4_loop;
l9:
  return (OOC_Doc__BlockElement)i0;
  ;
}

static void OOC_Doc__NormalizeArg(OOC_Doc__InlineElement inlineText) {
  register OOC_INT64 i0,i1;
  OOC_Doc__InlineElement last;

  i0 = (OOC_INT64)inlineText;
  i1 = i0!=(OOC_INT64)0;
  if (!i1) goto l4;
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 11783)))), OOC_Doc__InlineElementDesc_StripHeadWS)),OOC_Doc__InlineElementDesc_StripHeadWS)((OOC_Doc__InlineElement)i0);
  i0 = (OOC_INT64)inlineText;
  i0 = (OOC_INT64)OOC_Doc__LastInlineElement((OOC_Doc__InlineElement)i0);
  last = (OOC_Doc__InlineElement)i0;
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 11854)))), OOC_Doc__InlineElementDesc_StripTailWS)),OOC_Doc__InlineElementDesc_StripTailWS)((OOC_Doc__InlineElement)i0);
  OOC_Doc__NormalizeInlineList((void*)(OOC_INT64)&inlineText);
l4:
  return;
  ;
}

static void OOC_Doc__StripInlineListWS(OOC_Doc__InlineElement inlineList) {
  register OOC_INT64 i0,i1;
  OOC_Doc__InlineElement last;

  i0 = (OOC_INT64)inlineList;
  i1 = i0!=(OOC_INT64)0;
  if (!i1) goto l4;
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 12080)))), OOC_Doc__InlineElementDesc_StripHeadWS)),OOC_Doc__InlineElementDesc_StripHeadWS)((OOC_Doc__InlineElement)i0);
  i0 = (OOC_INT64)OOC_Doc__LastInlineElement((OOC_Doc__InlineElement)i0);
  last = (OOC_Doc__InlineElement)i0;
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 12151)))), OOC_Doc__InlineElementDesc_StripTailWS)),OOC_Doc__InlineElementDesc_StripTailWS)((OOC_Doc__InlineElement)i0);
l4:
  return;
  ;
}

static void OOC_Doc__InitGlyph(OOC_Doc__Glyph glyph, OOC_INT32 glyphCode) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)glyph;
  OOC_Doc__InitInlineElement((OOC_Doc__InlineElement)i0);
  i1 = glyphCode;
  *(OOC_INT32*)((_check_pointer(i0, 12383))+24) = i1;
  return;
  ;
}

OOC_Doc__Glyph OOC_Doc__NewGlyph(OOC_INT32 glyphCode) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__Glyph.baseTypes[0]);
  i1 = glyphCode;
  OOC_Doc__InitGlyph((OOC_Doc__Glyph)i0, i1);
  return (OOC_Doc__Glyph)i0;
  ;
}

void OOC_Doc__GlyphDesc_NodeName(OOC_Doc__Glyph glyph, OOC_CHAR8 name[], OOC_LEN name_0d) {
  register OOC_INT64 i0;

  i0 = (OOC_INT64)glyph;
  i0 = *(OOC_INT32*)((_check_pointer(i0, 12671))+24);
  switch (i0) {
  case 0:
    _copy_8((const void*)"bullet",(void*)(OOC_INT64)name,name_0d);
    goto l10;
  case 1:
    _copy_8((const void*)"dots",(void*)(OOC_INT64)name,name_0d);
    goto l10;
  case 2:
    _copy_8((const void*)"minus",(void*)(OOC_INT64)name,name_0d);
    goto l10;
  case 3:
    _copy_8((const void*)"em-dash",(void*)(OOC_INT64)name,name_0d);
    goto l10;
  case 4:
    _copy_8((const void*)"result",(void*)(OOC_INT64)name,name_0d);
    goto l10;
  case 5:
    _copy_8((const void*)"left-quote",(void*)(OOC_INT64)name,name_0d);
    goto l10;
  case 6:
    _copy_8((const void*)"right-quote",(void*)(OOC_INT64)name,name_0d);
    goto l10;
  default:
    _failed_case(i0, 12661);
    goto l10;
  }
l10:
  return;
  ;
}

void OOC_Doc__GlyphDesc_Normalize(OOC_Doc__Glyph glyph) {

  return;
  ;
}

void OOC_Doc__GlyphDesc_Store(OOC_Doc__Glyph glyph, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)glyph;
  i1 = (OOC_INT64)w;
  OOC_Doc__InlineElementDesc_Store((OOC_Doc__InlineElement)i0, (ADT_Storable__Writer)i1);
  i0 = *(OOC_INT32*)((_check_pointer(i0, 13180))+24);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 13163)))), IO_BinaryRider__WriterDesc_WriteNum)),IO_BinaryRider__WriterDesc_WriteNum)((IO_BinaryRider__Writer)i1, i0);
  return;
  ;
}

void OOC_Doc__GlyphDesc_Load(OOC_Doc__Glyph glyph, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)glyph;
  i1 = (OOC_INT64)r;
  OOC_Doc__InlineElementDesc_Load((OOC_Doc__InlineElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 13306)))), IO_BinaryRider__ReaderDesc_ReadNum)),IO_BinaryRider__ReaderDesc_ReadNum)((IO_BinaryRider__Reader)i1, (void*)((_check_pointer(i0, 13322))+24));
  return;
  ;
}

static void OOC_Doc__InitText(OOC_Doc__Text text, struct OOC_Doc__Position *pos, RT0__Struct pos__tag, OOC_CHAR8 string[], OOC_LEN string_0d) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)text;
  OOC_Doc__InitInlineElement((OOC_Doc__InlineElement)i0);
  _copy_block((OOC_INT64)pos,(_check_pointer(i0, 13469)),12);
  i1 = Strings__Length((void*)(OOC_INT64)string, string_0d);
  *(OOC_INT64*)((_check_pointer(i0, 13496))+24) = ((OOC_INT64)RT0__NewObject(_td_OOC_Scanner_InputBuffer__CharArray.baseTypes[0], (i1+1)));
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 13556))+24);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 13556))+24);
  i0 = OOC_ARRAY_LENGTH((_check_pointer(i0, 13564)), 0);
  _copy_8((const void*)(OOC_INT64)string,(void*)(_check_pointer(i1, 13564)),i0);
  return;
  ;
}

OOC_Doc__Text OOC_Doc__NewText(OOC_CHAR8 string[], OOC_LEN string_0d, struct OOC_Doc__Position *pos, RT0__Struct pos__tag) {
  register OOC_INT64 i0;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__Text.baseTypes[0]);
  OOC_Doc__InitText((OOC_Doc__Text)i0, (void*)(OOC_INT64)pos, (RT0__Struct)((OOC_INT64)pos__tag), (void*)(OOC_INT64)string, string_0d);
  return (OOC_Doc__Text)i0;
  ;
}

void OOC_Doc__TextDesc_NodeName(OOC_Doc__Text text, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"text",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__TextDesc_Normalize(OOC_Doc__Text text) {
  register OOC_INT64 i0,i1,i2,i3,i4,i5,i6,i7,i8;
  OOC_Scanner_InputBuffer__CharArray s;
  OOC_INT32 i;
  OOC_INT32 delta;
  OOC_INT32 dotExt;
  OOC_Scanner_InputBuffer__CharArray ns;

  i0 = (OOC_INT64)text;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 14160))+24);
  s = (OOC_Scanner_InputBuffer__CharArray)i1;
  i = 0;
  delta = 0;
  dotExt = 0;
  i2 = _check_pointer(i1, 14215);
  i3 = OOC_ARRAY_LENGTH(i2, 0);
  i2 = *(OOC_UINT8*)(i2+(_check_index(0, i3, OOC_UINT32, 14215)));
  i2 = i2!=0u;
  if (i2) goto l3;
  i2=0;i3=0;i4=0;
  goto l54;
l3:
  i2=0;i3=0;i4=0;
l4_loop:
  i5 = _check_pointer(i1, 14239);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index(i2, i6, OOC_UINT32, 14239)));
  i5 = (OOC_UINT8)i5<=(OOC_UINT8)32u;
  if (i5) goto l31;
  i5 = _check_pointer(i1, 14394);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index(i2, i6, OOC_UINT32, 14394)));
  i5 = i5==46u;
  if (i5) goto l9;
  i5 = _check_pointer(i1, 14889);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i7 = _check_pointer(i1, 14903);
  i8 = OOC_ARRAY_LENGTH(i7, 0);
  i7 = *(OOC_UINT8*)(i7+(_check_index(i2, i8, OOC_UINT32, 14903)));
  *(OOC_UINT8*)(i5+(_check_index((i2-i3), i6, OOC_UINT32, 14889))) = i7;
  i2 = i2+1;
  i = i2;
  
  goto l49;
l9:
  i5 = _check_pointer(i1, 14419);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i7 = _check_pointer(i1, 14433);
  i8 = OOC_ARRAY_LENGTH(i7, 0);
  i7 = *(OOC_UINT8*)(i7+(_check_index(i2, i8, OOC_UINT32, 14433)));
  *(OOC_UINT8*)(i5+(_check_index((i2-i3), i6, OOC_UINT32, 14419))) = i7;
  i2 = i2+1;
  i = i2;
  i5 = _check_pointer(i1, 14460);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index(i2, i6, OOC_UINT32, 14460)));
  i5 = i5!=0u;
  if (i5) goto l12;
  i5=0u;
  goto l14;
l12:
  i5 = _check_pointer(i1, 14474);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index(i2, i6, OOC_UINT32, 14474)));
  i5 = (OOC_UINT8)i5<=(OOC_UINT8)32u;
  
l14:
  if (i5) goto l16;
  i5=0u;
  goto l18;
l16:
  i5 = _check_pointer(i1, 14502);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index((i2+1), i6, OOC_UINT32, 14502)));
  i5 = i5!=0u;
  
l18:
  if (i5) goto l20;
  i5=0u;
  goto l22;
l20:
  i5 = _check_pointer(i1, 14518);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index((i2+1), i6, OOC_UINT32, 14518)));
  i5 = (OOC_UINT8)i5<=(OOC_UINT8)32u;
  
l22:
  if (i5) goto l28;
  i5 = _check_pointer(i1, 14612);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index(i2, i6, OOC_UINT32, 14612)));
  i5 = i5==10u;
  if (!i5) goto l49;
  i5 = _check_pointer(i1, 14818);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  *(OOC_UINT8*)(i5+(_check_index((i2-i3), i6, OOC_UINT32, 14818))) = 1u;
  i2 = i2+1;
  i = i2;
  i4 = i4+1;
  dotExt = i4;
  
  goto l49;
l28:
  i5 = _check_pointer(i1, 14548);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  *(OOC_UINT8*)(i5+(_check_index((i2-i3), i6, OOC_UINT32, 14548))) = 32u;
  i2 = i2+1;
  i = i2;
  
  goto l49;
l31:
  i5 = _check_pointer(i1, 14265);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  *(OOC_UINT8*)(i5+(_check_index((i2-i3), i6, OOC_UINT32, 14265))) = 32u;
  i2 = i2+1;
  i = i2;
  i5 = _check_pointer(i1, 14308);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index(i2, i6, OOC_UINT32, 14308)));
  i5 = i5!=0u;
  if (i5) goto l34;
  i5=0u;
  goto l36;
l34:
  i5 = _check_pointer(i1, 14322);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index(i2, i6, OOC_UINT32, 14322)));
  i5 = (OOC_UINT8)i5<=(OOC_UINT8)32u;
  
l36:
  if (!i5) goto l49;
l39_loop:
  i2 = i2+1;
  i = i2;
  i3 = i3+1;
  delta = i3;
  i5 = _check_pointer(i1, 14308);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index(i2, i6, OOC_UINT32, 14308)));
  i5 = i5!=0u;
  if (i5) goto l42;
  i5=0u;
  goto l44;
l42:
  i5 = _check_pointer(i1, 14322);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index(i2, i6, OOC_UINT32, 14322)));
  i5 = (OOC_UINT8)i5<=(OOC_UINT8)32u;
  
l44:
  if (i5) goto l39_loop;
l49:
  i5 = _check_pointer(i1, 14215);
  i6 = OOC_ARRAY_LENGTH(i5, 0);
  i5 = *(OOC_UINT8*)(i5+(_check_index(i2, i6, OOC_UINT32, 14215)));
  i5 = i5!=0u;
  if (i5) goto l4_loop;
l54:
  i5 = _check_pointer(i1, 14940);
  i2 = i2-i3;
  i3 = OOC_ARRAY_LENGTH(i5, 0);
  *(OOC_UINT8*)(i5+(_check_index(i2, i3, OOC_UINT32, 14940))) = 0u;
  i = i2;
  i3 = i2+i4;
  i5 = OOC_ARRAY_LENGTH((_check_pointer(i1, 15004)), 0);
  i5 = i3>=i5;
  if (i5) goto l57;
  ns = (OOC_Scanner_InputBuffer__CharArray)i1;
  i0=i1;
  goto l58;
l57:
  i3 = (OOC_INT64)RT0__NewObject(_td_OOC_Scanner_InputBuffer__CharArray.baseTypes[0], (i3+1));
  ns = (OOC_Scanner_InputBuffer__CharArray)i3;
  *(OOC_INT64*)((_check_pointer(i0, 15051))+24) = i3;
  i0=i3;
l58:
  i3 = i2>=0;
  if (!i3) goto l70;
  i3=i4;
l61_loop:
  i4 = _check_pointer(i1, 15131);
  i5 = OOC_ARRAY_LENGTH(i4, 0);
  i4 = *(OOC_UINT8*)(i4+(_check_index(i2, i5, OOC_UINT32, 15131)));
  i4 = i4==1u;
  if (i4) goto l64;
  i4 = _check_pointer(i0, 15263);
  i5 = OOC_ARRAY_LENGTH(i4, 0);
  i6 = _check_pointer(i1, 15278);
  i7 = OOC_ARRAY_LENGTH(i6, 0);
  i6 = *(OOC_UINT8*)(i6+(_check_index(i2, i7, OOC_UINT32, 15278)));
  *(OOC_UINT8*)(i4+(_check_index((i2+i3), i5, OOC_UINT32, 15263))) = i6;
  i2 = i2-1;
  i = i2;
  
  goto l65;
l64:
  i4 = _check_pointer(i0, 15156);
  i5 = OOC_ARRAY_LENGTH(i4, 0);
  *(OOC_UINT8*)(i4+(_check_index((i2+i3), i5, OOC_UINT32, 15156))) = 32u;
  i3 = i3-1;
  dotExt = i3;
  i4 = _check_pointer(i0, 15207);
  i5 = OOC_ARRAY_LENGTH(i4, 0);
  *(OOC_UINT8*)(i4+(_check_index((i2+i3), i5, OOC_UINT32, 15207))) = 32u;
  i2 = i2-1;
  i = i2;
  
l65:
  i4 = i2>=0;
  if (i4) goto l61_loop;
l70:
  return;
  ;
}

void OOC_Doc__TextDesc_StripHeadWS(OOC_Doc__Text text) {
  register OOC_INT64 i0,i1,i2,i3;
  OOC_INT32 i;

  i = 0;
  i0 = (OOC_INT64)text;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15428))+24);
  i1 = _check_pointer(i1, 15436);
  i2 = OOC_ARRAY_LENGTH(i1, 0);
  i1 = *(OOC_UINT8*)(i1+(_check_index(0, i2, OOC_UINT32, 15436)));
  i1 = i1!=0u;
  if (i1) goto l3;
  i1=0u;
  goto l5;
l3:
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15453))+24);
  i1 = _check_pointer(i1, 15461);
  i2 = OOC_ARRAY_LENGTH(i1, 0);
  i1 = *(OOC_UINT8*)(i1+(_check_index(0, i2, OOC_UINT32, 15461)));
  i1 = (OOC_UINT8)i1<=(OOC_UINT8)32u;
  
l5:
  if (i1) goto l7;
  i1=0;
  goto l17;
l7:
  i1=0;
l8_loop:
  i1 = i1+1;
  i = i1;
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15428))+24);
  i2 = _check_pointer(i2, 15436);
  i3 = OOC_ARRAY_LENGTH(i2, 0);
  i2 = *(OOC_UINT8*)(i2+(_check_index(i1, i3, OOC_UINT32, 15436)));
  i2 = i2!=0u;
  if (i2) goto l11;
  i2=0u;
  goto l13;
l11:
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15453))+24);
  i2 = _check_pointer(i2, 15461);
  i3 = OOC_ARRAY_LENGTH(i2, 0);
  i2 = *(OOC_UINT8*)(i2+(_check_index(i1, i3, OOC_UINT32, 15461)));
  i2 = (OOC_UINT8)i2<=(OOC_UINT8)32u;
  
l13:
  if (i2) goto l8_loop;
l17:
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15523))+24);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15523))+24);
  i0 = OOC_ARRAY_LENGTH((_check_pointer(i0, 15531)), 0);
  Strings__Delete((void*)(_check_pointer(i2, 15531)), i0, 0, i1);
  return;
  ;
}

void OOC_Doc__TextDesc_StripTailWS(OOC_Doc__Text text) {
  register OOC_INT64 i0,i1,i2,i3;
  OOC_INT32 i;

  i0 = (OOC_INT64)text;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15663))+24);
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15663))+24);
  i2 = OOC_ARRAY_LENGTH((_check_pointer(i2, 15671)), 0);
  i1 = Strings__Length((void*)(_check_pointer(i1, 15671)), i2);
  i = i1;
  i2 = i1!=0;
  if (i2) goto l3;
  i2=0u;
  goto l5;
l3:
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15700))+24);
  i2 = _check_pointer(i2, 15708);
  i3 = OOC_ARRAY_LENGTH(i2, 0);
  i2 = *(OOC_UINT8*)(i2+(_check_index((i1-1), i3, OOC_UINT32, 15708)));
  i2 = (OOC_UINT8)i2<=(OOC_UINT8)32u;
  
l5:
  if (!i2) goto l17;
l8_loop:
  i1 = i1-1;
  i = i1;
  i2 = i1!=0;
  if (i2) goto l11;
  i2=0u;
  goto l13;
l11:
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15700))+24);
  i2 = _check_pointer(i2, 15708);
  i3 = OOC_ARRAY_LENGTH(i2, 0);
  i2 = *(OOC_UINT8*)(i2+(_check_index((i1-1), i3, OOC_UINT32, 15708)));
  i2 = (OOC_UINT8)i2<=(OOC_UINT8)32u;
  
l13:
  if (i2) goto l8_loop;
l17:
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15756))+24);
  i0 = _check_pointer(i0, 15764);
  i2 = OOC_ARRAY_LENGTH(i0, 0);
  *(OOC_UINT8*)(i0+(_check_index(i1, i2, OOC_UINT32, 15764))) = 0u;
  return;
  ;
}

void OOC_Doc__TextDesc_Store(OOC_Doc__Text text, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1,i2,i3,i4;
  OOC_INT32 i;

  i0 = (OOC_INT64)text;
  i1 = (OOC_INT64)w;
  OOC_Doc__InlineElementDesc_Store((OOC_Doc__InlineElement)i0, (ADT_Storable__Writer)i1);
  i = 0;
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15941))+24);
  i2 = _check_pointer(i2, 15949);
  i3 = OOC_ARRAY_LENGTH(i2, 0);
  i2 = *(OOC_UINT8*)(i2+(_check_index(0, i3, OOC_UINT32, 15949)));
  i2 = i2!=0u;
  if (i2) goto l3;
  i2=0;
  goto l9;
l3:
  i2=0;
l4_loop:
  i2 = i2+1;
  i = i2;
  i3 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 15941))+24);
  i3 = _check_pointer(i3, 15949);
  i4 = OOC_ARRAY_LENGTH(i3, 0);
  i3 = *(OOC_UINT8*)(i3+(_check_index(i2, i4, OOC_UINT32, 15949)));
  i3 = i3!=0u;
  if (i3) goto l4_loop;
l9:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 15990)))), IO_BinaryRider__WriterDesc_WriteNum)),IO_BinaryRider__WriterDesc_WriteNum)((IO_BinaryRider__Writer)i1, i2);
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 16030))+24);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 16030))+24);
  i0 = OOC_ARRAY_LENGTH((_check_pointer(i0, 16038)), 0);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 16011)))), IO_BinaryRider__WriterDesc_WriteString)),IO_BinaryRider__WriterDesc_WriteString)((IO_BinaryRider__Writer)i1, (void*)(_check_pointer(i2, 16038)), i0);
  return;
  ;
}

void OOC_Doc__TextDesc_Load(OOC_Doc__Text text, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2;
  OOC_INT32 len;

  i0 = (OOC_INT64)text;
  i1 = (OOC_INT64)r;
  OOC_Doc__InlineElementDesc_Load((OOC_Doc__InlineElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 16180)))), IO_BinaryRider__ReaderDesc_ReadNum)),IO_BinaryRider__ReaderDesc_ReadNum)((IO_BinaryRider__Reader)i1, (void*)(OOC_INT64)&len);
  i2 = len;
  *(OOC_INT64*)((_check_pointer(i0, 16210))+24) = ((OOC_INT64)RT0__NewObject(_td_OOC_Scanner_InputBuffer__CharArray.baseTypes[0], (i2+1)));
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 16251))+24);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 16251))+24);
  i0 = OOC_ARRAY_LENGTH((_check_pointer(i0, 16259)), 0);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 16233)))), IO_BinaryRider__ReaderDesc_ReadString)),IO_BinaryRider__ReaderDesc_ReadString)((IO_BinaryRider__Reader)i1, (void*)(_check_pointer(i2, 16259)), i0);
  return;
  ;
}

static void OOC_Doc__InitMarkedInline(OOC_Doc__MarkedInline mi, OOC_INT32 mark, OOC_Doc__InlineElement inlineText) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)mi;
  OOC_Doc__InitInlineElement((OOC_Doc__InlineElement)i0);
  i1 = mark;
  *(OOC_INT32*)((_check_pointer(i0, 16435))+24) = i1;
  i1 = (OOC_INT64)inlineText;
  *(OOC_INT64*)((_check_pointer(i0, 16457))+32) = i1;
  return;
  ;
}

OOC_Doc__MarkedInline OOC_Doc__NewMarkedInline(OOC_INT32 mark, OOC_Doc__InlineElement inlineText) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__MarkedInline.baseTypes[0]);
  i1 = mark;
  i2 = (OOC_INT64)inlineText;
  OOC_Doc__InitMarkedInline((OOC_Doc__MarkedInline)i0, i1, (OOC_Doc__InlineElement)i2);
  return (OOC_Doc__MarkedInline)i0;
  ;
}

void OOC_Doc__MarkedInlineDesc_NodeName(OOC_Doc__MarkedInline mi, OOC_CHAR8 name[], OOC_LEN name_0d) {
  register OOC_INT64 i0;

  i0 = (OOC_INT64)mi;
  i0 = *(OOC_INT32*)((_check_pointer(i0, 16812))+24);
  switch (i0) {
  case 0:
    _copy_8((const void*)"asis",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 1:
    _copy_8((const void*)"cite",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 2:
    _copy_8((const void*)"code",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 3:
    _copy_8((const void*)"command",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 4:
    _copy_8((const void*)"dfn",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 5:
    _copy_8((const void*)"emph",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 6:
    _copy_8((const void*)"file",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 7:
    _copy_8((const void*)"kbd",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 8:
    _copy_8((const void*)"samp",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 9:
    _copy_8((const void*)"strong",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 10:
    _copy_8((const void*)"var",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 11:
    _copy_8((const void*)"url",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 12:
    _copy_8((const void*)"oberon-module",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 13:
    _copy_8((const void*)"oberon-const",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 14:
    _copy_8((const void*)"oberon-field",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 15:
    _copy_8((const void*)"oberon-param",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 16:
    _copy_8((const void*)"oberon-proc",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 17:
    _copy_8((const void*)"oberon-type",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  case 18:
    _copy_8((const void*)"oberon-var",(void*)(OOC_INT64)name,name_0d);
    goto l22;
  default:
    _failed_case(i0, 16805);
    goto l22;
  }
l22:
  return;
  ;
}

void OOC_Doc__MarkedInlineDesc_Normalize(OOC_Doc__MarkedInline mi) {
  register OOC_INT64 i0;

  i0 = (OOC_INT64)mi;
  OOC_Doc__NormalizeInlineList((void*)((_check_pointer(i0, 17708))+32));
  return;
  ;
}

void OOC_Doc__MarkedInlineDesc_StripHeadWS(OOC_Doc__MarkedInline mi) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)mi;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 17796))+32);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 17796))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 17808)))), OOC_Doc__InlineElementDesc_StripHeadWS)),OOC_Doc__InlineElementDesc_StripHeadWS)((OOC_Doc__InlineElement)i0);
  return;
  ;
}

void OOC_Doc__MarkedInlineDesc_StripTailWS(OOC_Doc__MarkedInline mi) {
  register OOC_INT64 i0;
  OOC_Doc__InlineElement last;

  i0 = (OOC_INT64)mi;
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 17956))+32);
  i0 = (OOC_INT64)OOC_Doc__LastInlineElement((OOC_Doc__InlineElement)i0);
  last = (OOC_Doc__InlineElement)i0;
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 17979)))), OOC_Doc__InlineElementDesc_StripTailWS)),OOC_Doc__InlineElementDesc_StripTailWS)((OOC_Doc__InlineElement)i0);
  return;
  ;
}

void OOC_Doc__MarkedInlineDesc_Store(OOC_Doc__MarkedInline mi, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)mi;
  i1 = (OOC_INT64)w;
  OOC_Doc__InlineElementDesc_Store((OOC_Doc__InlineElement)i0, (ADT_Storable__Writer)i1);
  i2 = *(OOC_INT32*)((_check_pointer(i0, 18134))+24);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 18120)))), IO_BinaryRider__WriterDesc_WriteNum)),IO_BinaryRider__WriterDesc_WriteNum)((IO_BinaryRider__Writer)i1, i2);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 18165))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 18148)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__MarkedInlineDesc_Load(OOC_Doc__MarkedInline mi, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2;
  Object__Object obj;

  i0 = (OOC_INT64)mi;
  i1 = (OOC_INT64)r;
  OOC_Doc__InlineElementDesc_Load((OOC_Doc__InlineElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 18328)))), IO_BinaryRider__ReaderDesc_ReadNum)),IO_BinaryRider__ReaderDesc_ReadNum)((IO_BinaryRider__Reader)i1, (void*)((_check_pointer(i0, 18341))+24));
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 18355)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 18444))+32) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 18464)))), &_td_OOC_Doc__InlineElementDesc, 18464));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 18407))+32) = (OOC_INT64)0;
l4:
  return;
  ;
}

static void OOC_Doc__InitOberonRef(OOC_Doc__OberonRef or, OOC_INT32 mark, OOC_Doc__InlineElement inlineText, ADT_Storable__Object target) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)or;
  i1 = mark;
  i2 = (OOC_INT64)inlineText;
  OOC_Doc__InitMarkedInline((OOC_Doc__MarkedInline)i0, i1, (OOC_Doc__InlineElement)i2);
  i1 = (OOC_INT64)target;
  *(OOC_INT64*)((_check_pointer(i0, 18718))+40) = i1;
  *(OOC_INT64*)((_check_pointer(i0, 18744))+48) = (OOC_INT64)0;
  *(OOC_INT64*)((_check_pointer(i0, 18775))+56) = (OOC_INT64)0;
  return;
  ;
}

OOC_Doc__MarkedInline OOC_Doc__NewOberonRef(OOC_INT32 mark, OOC_Doc__InlineElement inlineText, ADT_Storable__Object target) {
  register OOC_INT64 i0,i1,i2,i3;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__OberonRef.baseTypes[0]);
  i1 = mark;
  i2 = (OOC_INT64)inlineText;
  i3 = (OOC_INT64)target;
  OOC_Doc__InitOberonRef((OOC_Doc__OberonRef)i0, i1, (OOC_Doc__InlineElement)i2, (ADT_Storable__Object)i3);
  return (OOC_Doc__MarkedInline)i0;
  ;
}

void OOC_Doc__OberonRefDesc_SetTarget(OOC_Doc__OberonRef or, ADT_Storable__Object targetDecl) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)or;
  i1 = (OOC_INT64)targetDecl;
  *(OOC_INT64*)((_check_pointer(i0, 19164))+40) = i1;
  return;
  ;
}

void OOC_Doc__OberonRefDesc_SetExternalTarget(OOC_Doc__OberonRef or, OOC_Scanner_InputBuffer__CharArray module, OOC_Scanner_InputBuffer__CharArray id) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)or;
  i1 = (OOC_INT64)module;
  *(OOC_INT64*)((_check_pointer(i0, 19301))+48) = i1;
  i1 = (OOC_INT64)id;
  *(OOC_INT64*)((_check_pointer(i0, 19335))+56) = i1;
  return;
  ;
}

void OOC_Doc__OberonRefDesc_Store(OOC_Doc__OberonRef or, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)or;
  i1 = (OOC_INT64)w;
  OOC_Doc__MarkedInlineDesc_Store((OOC_Doc__MarkedInline)i0, (ADT_Storable__Writer)i1);
  return;
  ;
}

void OOC_Doc__OberonRefDesc_Load(OOC_Doc__OberonRef or, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)or;
  i1 = (OOC_INT64)r;
  OOC_Doc__MarkedInlineDesc_Load((OOC_Doc__MarkedInline)i0, (ADT_Storable__Reader)i1);
  *(OOC_INT64*)((_check_pointer(i0, 19656))+40) = (OOC_INT64)0;
  *(OOC_INT64*)((_check_pointer(i0, 19679))+48) = (OOC_INT64)0;
  *(OOC_INT64*)((_check_pointer(i0, 19710))+56) = (OOC_INT64)0;
  return;
  ;
}

static void OOC_Doc__InitEmail(OOC_Doc__Email email, OOC_Doc__InlineElement address, OOC_Doc__InlineElement displayed) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)email;
  OOC_Doc__InitInlineElement((OOC_Doc__InlineElement)i0);
  i1 = (OOC_INT64)address;
  *(OOC_INT64*)((_check_pointer(i0, 19863))+24) = i1;
  i1 = (OOC_INT64)displayed;
  *(OOC_INT64*)((_check_pointer(i0, 19894))+32) = i1;
  return;
  ;
}

OOC_Doc__Email OOC_Doc__NewEmail(OOC_Doc__InlineElement address, OOC_Doc__InlineElement displayed) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__Email.baseTypes[0]);
  i1 = (OOC_INT64)address;
  i2 = (OOC_INT64)displayed;
  OOC_Doc__InitEmail((OOC_Doc__Email)i0, (OOC_Doc__InlineElement)i1, (OOC_Doc__InlineElement)i2);
  return (OOC_Doc__Email)i0;
  ;
}

void OOC_Doc__EmailDesc_NodeName(OOC_Doc__Email email, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"email",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__EmailDesc_Normalize(OOC_Doc__Email email) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)email;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 20307))+24);
  OOC_Doc__NormalizeArg((OOC_Doc__InlineElement)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 20342))+32);
  OOC_Doc__NormalizeArg((OOC_Doc__InlineElement)i0);
  return;
  ;
}

void OOC_Doc__EmailDesc_Store(OOC_Doc__Email email, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)email;
  i1 = (OOC_INT64)w;
  OOC_Doc__InlineElementDesc_Store((OOC_Doc__InlineElement)i0, (ADT_Storable__Writer)i1);
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 20499))+24);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 20479)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i2);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 20536))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 20516)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__EmailDesc_Load(OOC_Doc__Email email, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2,i3;
  Object__Object obj;

  i0 = (OOC_INT64)email;
  i1 = (OOC_INT64)r;
  OOC_Doc__InlineElementDesc_Load((OOC_Doc__InlineElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 20697)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i2 = (OOC_INT64)obj;
  i3 = i2==(OOC_INT64)0;
  if (i3) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 20789))+24) = (_type_guard(i2, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 20806)))), &_td_OOC_Doc__InlineElementDesc, 20806));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 20752))+24) = (OOC_INT64)0;
l4:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 20835)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l7;
  *(OOC_INT64*)((_check_pointer(i0, 20929))+32) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 20948)))), &_td_OOC_Doc__InlineElementDesc, 20948));
  goto l8;
l7:
  *(OOC_INT64*)((_check_pointer(i0, 20890))+32) = (OOC_INT64)0;
l8:
  return;
  ;
}

static void OOC_Doc__InitUref(OOC_Doc__Uref uref, OOC_Doc__InlineElement url, OOC_Doc__InlineElement text, OOC_Doc__InlineElement replacement) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)uref;
  OOC_Doc__InitInlineElement((OOC_Doc__InlineElement)i0);
  i1 = (OOC_INT64)url;
  *(OOC_INT64*)((_check_pointer(i0, 21103))+24) = i1;
  i1 = (OOC_INT64)text;
  *(OOC_INT64*)((_check_pointer(i0, 21125))+32) = i1;
  i1 = (OOC_INT64)replacement;
  *(OOC_INT64*)((_check_pointer(i0, 21149))+40) = i1;
  return;
  ;
}

OOC_Doc__Uref OOC_Doc__NewUref(OOC_Doc__InlineElement url, OOC_Doc__InlineElement text, OOC_Doc__InlineElement replacement) {
  register OOC_INT64 i0,i1,i2,i3;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__Uref.baseTypes[0]);
  i1 = (OOC_INT64)url;
  i2 = (OOC_INT64)text;
  i3 = (OOC_INT64)replacement;
  OOC_Doc__InitUref((OOC_Doc__Uref)i0, (OOC_Doc__InlineElement)i1, (OOC_Doc__InlineElement)i2, (OOC_Doc__InlineElement)i3);
  return (OOC_Doc__Uref)i0;
  ;
}

void OOC_Doc__UrefDesc_NodeName(OOC_Doc__Uref uref, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"uref",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__UrefDesc_Normalize(OOC_Doc__Uref uref) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)uref;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 21558))+24);
  OOC_Doc__NormalizeArg((OOC_Doc__InlineElement)i1);
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 21588))+32);
  OOC_Doc__NormalizeArg((OOC_Doc__InlineElement)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 21619))+40);
  OOC_Doc__NormalizeArg((OOC_Doc__InlineElement)i0);
  return;
  ;
}

void OOC_Doc__UrefDesc_Store(OOC_Doc__Uref uref, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)uref;
  i1 = (OOC_INT64)w;
  OOC_Doc__InlineElementDesc_Store((OOC_Doc__InlineElement)i0, (ADT_Storable__Writer)i1);
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 21774))+24);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 21755)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i2);
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 21806))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 21787)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i2);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 21839))+40);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 21820)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__UrefDesc_Load(OOC_Doc__Uref uref, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2,i3;
  Object__Object obj;

  i0 = (OOC_INT64)uref;
  i1 = (OOC_INT64)r;
  OOC_Doc__InlineElementDesc_Load((OOC_Doc__InlineElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 22000)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i2 = (OOC_INT64)obj;
  i3 = i2==(OOC_INT64)0;
  if (i3) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 22086))+24) = (_type_guard(i2, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 22099)))), &_td_OOC_Doc__InlineElementDesc, 22099));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 22054))+24) = (OOC_INT64)0;
l4:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 22128)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i2 = (OOC_INT64)obj;
  i3 = i2==(OOC_INT64)0;
  if (i3) goto l7;
  *(OOC_INT64*)((_check_pointer(i0, 22215))+32) = (_type_guard(i2, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 22229)))), &_td_OOC_Doc__InlineElementDesc, 22229));
  goto l8;
l7:
  *(OOC_INT64*)((_check_pointer(i0, 22182))+32) = (OOC_INT64)0;
l8:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 22258)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l11;
  *(OOC_INT64*)((_check_pointer(i0, 22352))+40) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 22373)))), &_td_OOC_Doc__InlineElementDesc, 22373));
  goto l12;
l11:
  *(OOC_INT64*)((_check_pointer(i0, 22312))+40) = (OOC_INT64)0;
l12:
  return;
  ;
}

static void OOC_Doc__InitParagraph(OOC_Doc__Paragraph p, OOC_CHAR8 padAfter, OOC_Doc__InlineElement inlineText, OOC_CHAR8 noIndent) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)p;
  i1 = padAfter;
  OOC_Doc__InitBlockElement((OOC_Doc__BlockElement)i0, i1);
  i1 = (OOC_INT64)inlineText;
  *(OOC_INT64*)((_check_pointer(i0, 22565))+32) = i1;
  i1 = noIndent;
  *(OOC_UINT8*)((_check_pointer(i0, 22598))+40) = i1;
  return;
  ;
}

OOC_Doc__Paragraph OOC_Doc__NewParagraph(OOC_CHAR8 padAfter, OOC_Doc__InlineElement inlineText, OOC_CHAR8 noIndent) {
  register OOC_INT64 i0,i1,i2,i3;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__Paragraph.baseTypes[0]);
  i1 = padAfter;
  i2 = (OOC_INT64)inlineText;
  i3 = noIndent;
  OOC_Doc__InitParagraph((OOC_Doc__Paragraph)i0, i1, (OOC_Doc__InlineElement)i2, i3);
  return (OOC_Doc__Paragraph)i0;
  ;
}

void OOC_Doc__ParagraphDesc_NodeName(OOC_Doc__Paragraph p, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"p",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__ParagraphDesc_Normalize(OOC_Doc__Paragraph p) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)p;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 23056))+32);
  OOC_Doc__StripInlineListWS((OOC_Doc__InlineElement)i1);
  OOC_Doc__NormalizeInlineList((void*)((_check_pointer(i0, 23097))+32));
  return;
  ;
}

void OOC_Doc__ParagraphDesc_Store(OOC_Doc__Paragraph p, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)p;
  i1 = (OOC_INT64)w;
  OOC_Doc__BlockElementDesc_Store((OOC_Doc__BlockElement)i0, (ADT_Storable__Writer)i1);
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 23247))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 23231)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i2);
  i0 = *(OOC_UINT8*)((_check_pointer(i0, 23281))+40);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 23267)))), IO_BinaryRider__WriterDesc_WriteBool)),IO_BinaryRider__WriterDesc_WriteBool)((IO_BinaryRider__Writer)i1, i0);
  return;
  ;
}

void OOC_Doc__ParagraphDesc_Load(OOC_Doc__Paragraph p, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2,i3;
  Object__Object obj;

  i0 = (OOC_INT64)p;
  i1 = (OOC_INT64)r;
  OOC_Doc__BlockElementDesc_Load((OOC_Doc__BlockElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 23437)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i2 = (OOC_INT64)obj;
  i3 = i2==(OOC_INT64)0;
  if (i3) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 23524))+32) = (_type_guard(i2, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 23544)))), &_td_OOC_Doc__InlineElementDesc, 23544));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 23488))+32) = (OOC_INT64)0;
l4:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 23573)))), IO_BinaryRider__ReaderDesc_ReadBool)),IO_BinaryRider__ReaderDesc_ReadBool)((IO_BinaryRider__Reader)i1, (void*)((_check_pointer(i0, 23586))+40));
  return;
  ;
}

static void OOC_Doc__InitExample(OOC_Doc__Example ex, OOC_CHAR8 padAfter, OOC_Doc__InlineElement inlineText) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)ex;
  i1 = padAfter;
  OOC_Doc__InitBlockElement((OOC_Doc__BlockElement)i0, i1);
  i1 = (OOC_INT64)inlineText;
  *(OOC_INT64*)((_check_pointer(i0, 23746))+32) = i1;
  return;
  ;
}

OOC_Doc__Example OOC_Doc__NewExample(OOC_CHAR8 padAfter, OOC_Doc__InlineElement inlineText) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__Example.baseTypes[0]);
  i1 = padAfter;
  i2 = (OOC_INT64)inlineText;
  OOC_Doc__InitExample((OOC_Doc__Example)i0, i1, (OOC_Doc__InlineElement)i2);
  return (OOC_Doc__Example)i0;
  ;
}

void OOC_Doc__ExampleDesc_NodeName(OOC_Doc__Example ex, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"example",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__ExampleDesc_Normalize(OOC_Doc__Example ex) {

  return;
  ;
}

void OOC_Doc__ExampleDesc_Store(OOC_Doc__Example ex, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)ex;
  i1 = (OOC_INT64)w;
  OOC_Doc__BlockElementDesc_Store((OOC_Doc__BlockElement)i0, (ADT_Storable__Writer)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 24280))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 24263)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__ExampleDesc_Load(OOC_Doc__Example ex, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2;
  Object__Object obj;

  i0 = (OOC_INT64)ex;
  i1 = (OOC_INT64)r;
  OOC_Doc__BlockElementDesc_Load((OOC_Doc__BlockElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 24438)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 24527))+32) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 24547)))), &_td_OOC_Doc__InlineElementDesc, 24547));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 24490))+32) = (OOC_INT64)0;
l4:
  return;
  ;
}

static void OOC_Doc__InitPreCond(OOC_Doc__PreCond pc, OOC_CHAR8 padAfter, OOC_Doc__BlockElement blockList) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)pc;
  i1 = padAfter;
  OOC_Doc__InitBlockElement((OOC_Doc__BlockElement)i0, i1);
  i1 = (OOC_INT64)blockList;
  *(OOC_INT64*)((_check_pointer(i0, 24716))+32) = i1;
  return;
  ;
}

OOC_Doc__PreCond OOC_Doc__NewPreCond(OOC_CHAR8 padAfter, OOC_Doc__BlockElement blockList) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__PreCond.baseTypes[0]);
  i1 = padAfter;
  i2 = (OOC_INT64)blockList;
  OOC_Doc__InitPreCond((OOC_Doc__PreCond)i0, i1, (OOC_Doc__BlockElement)i2);
  return (OOC_Doc__PreCond)i0;
  ;
}

void OOC_Doc__PreCondDesc_NodeName(OOC_Doc__PreCond pc, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"pre-cond",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__PreCondDesc_Normalize(OOC_Doc__PreCond pc) {
  register OOC_INT64 i0;

  i0 = (OOC_INT64)pc;
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 25143))+32);
  OOC_Doc__NormalizeBlockList((OOC_Doc__BlockElement)i0);
  return;
  ;
}

void OOC_Doc__PreCondDesc_Store(OOC_Doc__PreCond pc, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)pc;
  i1 = (OOC_INT64)w;
  OOC_Doc__BlockElementDesc_Store((OOC_Doc__BlockElement)i0, (ADT_Storable__Writer)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 25293))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 25276)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__PreCondDesc_Load(OOC_Doc__PreCond pc, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2;
  Object__Object obj;

  i0 = (OOC_INT64)pc;
  i1 = (OOC_INT64)r;
  OOC_Doc__BlockElementDesc_Load((OOC_Doc__BlockElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 25450)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 25538))+32) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 25557)))), &_td_OOC_Doc__BlockElementDesc, 25557));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 25502))+32) = (OOC_INT64)0;
l4:
  return;
  ;
}

static void OOC_Doc__InitPostCond(OOC_Doc__PostCond pc, OOC_CHAR8 padAfter, OOC_Doc__BlockElement blockList) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)pc;
  i1 = padAfter;
  OOC_Doc__InitBlockElement((OOC_Doc__BlockElement)i0, i1);
  i1 = (OOC_INT64)blockList;
  *(OOC_INT64*)((_check_pointer(i0, 25727))+32) = i1;
  return;
  ;
}

OOC_Doc__PostCond OOC_Doc__NewPostCond(OOC_CHAR8 padAfter, OOC_Doc__BlockElement blockList) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__PostCond.baseTypes[0]);
  i1 = padAfter;
  i2 = (OOC_INT64)blockList;
  OOC_Doc__InitPostCond((OOC_Doc__PostCond)i0, i1, (OOC_Doc__BlockElement)i2);
  return (OOC_Doc__PostCond)i0;
  ;
}

void OOC_Doc__PostCondDesc_NodeName(OOC_Doc__PostCond pc, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"post-cond",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__PostCondDesc_Normalize(OOC_Doc__PostCond pc) {
  register OOC_INT64 i0;

  i0 = (OOC_INT64)pc;
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 26163))+32);
  OOC_Doc__NormalizeBlockList((OOC_Doc__BlockElement)i0);
  return;
  ;
}

void OOC_Doc__PostCondDesc_Store(OOC_Doc__PostCond pc, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)pc;
  i1 = (OOC_INT64)w;
  OOC_Doc__BlockElementDesc_Store((OOC_Doc__BlockElement)i0, (ADT_Storable__Writer)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 26314))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 26297)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__PostCondDesc_Load(OOC_Doc__PostCond pc, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2;
  Object__Object obj;

  i0 = (OOC_INT64)pc;
  i1 = (OOC_INT64)r;
  OOC_Doc__BlockElementDesc_Load((OOC_Doc__BlockElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 26472)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 26560))+32) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 26579)))), &_td_OOC_Doc__BlockElementDesc, 26579));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 26524))+32) = (OOC_INT64)0;
l4:
  return;
  ;
}

static void OOC_Doc__InitItem(OOC_Doc__Item item, OOC_CHAR8 padAfter, OOC_Doc__BlockElement blockList) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)item;
  i1 = padAfter;
  OOC_Doc__InitBlockElement((OOC_Doc__BlockElement)i0, i1);
  i1 = (OOC_INT64)blockList;
  *(OOC_INT64*)((_check_pointer(i0, 26747))+32) = i1;
  return;
  ;
}

OOC_Doc__Item OOC_Doc__NewItem(OOC_CHAR8 padAfter, OOC_Doc__BlockElement blockList) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__Item.baseTypes[0]);
  i1 = padAfter;
  i2 = (OOC_INT64)blockList;
  OOC_Doc__InitItem((OOC_Doc__Item)i0, i1, (OOC_Doc__BlockElement)i2);
  return (OOC_Doc__Item)i0;
  ;
}

void OOC_Doc__ItemDesc_NodeName(OOC_Doc__Item item, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"item",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__ItemDesc_Normalize(OOC_Doc__Item item) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)item;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 27161))+32);
  OOC_Doc__NormalizeBlockList((OOC_Doc__BlockElement)i1);
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 27201))+32);
  OOC_Doc__NoPadLastElement((OOC_Doc__BlockElement)i1);
  *(OOC_UINT8*)((_check_pointer(i0, 27223))+24) = 1u;
  return;
  ;
}

void OOC_Doc__ItemDesc_Store(OOC_Doc__Item item, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)item;
  i1 = (OOC_INT64)w;
  OOC_Doc__BlockElementDesc_Store((OOC_Doc__BlockElement)i0, (ADT_Storable__Writer)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 27382))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 27363)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__ItemDesc_Load(OOC_Doc__Item item, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2;
  Object__Object obj;

  i0 = (OOC_INT64)item;
  i1 = (OOC_INT64)r;
  OOC_Doc__BlockElementDesc_Load((OOC_Doc__BlockElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 27540)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 27632))+32) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 27651)))), &_td_OOC_Doc__BlockElementDesc, 27651));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 27594))+32) = (OOC_INT64)0;
l4:
  return;
  ;
}

static void OOC_Doc__InitItemize(OOC_Doc__Itemize i, OOC_CHAR8 padAfter, OOC_Doc__InlineElement mark, OOC_Doc__Item text, OOC_Doc__BlockElement itemList) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)i;
  i1 = padAfter;
  OOC_Doc__InitBlockElement((OOC_Doc__BlockElement)i0, i1);
  i1 = (OOC_INT64)mark;
  *(OOC_INT64*)((_check_pointer(i0, 27871))+32) = i1;
  i1 = (OOC_INT64)text;
  *(OOC_INT64*)((_check_pointer(i0, 27892))+40) = i1;
  i1 = (OOC_INT64)itemList;
  *(OOC_INT64*)((_check_pointer(i0, 27913))+48) = i1;
  return;
  ;
}

OOC_Doc__Itemize OOC_Doc__NewItemize(OOC_CHAR8 padAfter, OOC_Doc__InlineElement mark, OOC_Doc__Item text, OOC_Doc__BlockElement itemList) {
  register OOC_INT64 i0,i1,i2,i3,i4;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__Itemize.baseTypes[0]);
  i1 = padAfter;
  i2 = (OOC_INT64)mark;
  i3 = (OOC_INT64)text;
  i4 = (OOC_INT64)itemList;
  OOC_Doc__InitItemize((OOC_Doc__Itemize)i0, i1, (OOC_Doc__InlineElement)i2, (OOC_Doc__Item)i3, (OOC_Doc__BlockElement)i4);
  return (OOC_Doc__Itemize)i0;
  ;
}

void OOC_Doc__ItemizeDesc_NodeName(OOC_Doc__Itemize i, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"itemize",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__ItemizeDesc_Normalize(OOC_Doc__Itemize i) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)i;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 28396))+32);
  OOC_Doc__StripInlineListWS((OOC_Doc__InlineElement)i1);
  OOC_Doc__NormalizeInlineList((void*)((_check_pointer(i0, 28431))+32));
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 28449))+40);
  i1 = i1!=(OOC_INT64)0;
  if (!i1) goto l4;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 28475))+40);
  OOC_Doc__ItemDesc_Normalize((OOC_Doc__Item)i1);
l4:
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 28527))+48);
  OOC_Doc__NormalizeBlockList((OOC_Doc__BlockElement)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 28563))+48);
  OOC_Doc__NoPadLastElement((OOC_Doc__BlockElement)i0);
  return;
  ;
}

void OOC_Doc__ItemizeDesc_Store(OOC_Doc__Itemize i, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)i;
  i1 = (OOC_INT64)w;
  OOC_Doc__BlockElementDesc_Store((OOC_Doc__BlockElement)i0, (ADT_Storable__Writer)i1);
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 28709))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 28693)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i2);
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 28739))+40);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 28723)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i2);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 28769))+48);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 28753)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__ItemizeDesc_Load(OOC_Doc__Itemize i, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2,i3;
  Object__Object obj;

  i0 = (OOC_INT64)i;
  i1 = (OOC_INT64)r;
  OOC_Doc__BlockElementDesc_Load((OOC_Doc__BlockElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 28923)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i2 = (OOC_INT64)obj;
  i3 = i2==(OOC_INT64)0;
  if (i3) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 29004))+32) = (_type_guard(i2, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 29018)))), &_td_OOC_Doc__InlineElementDesc, 29018));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 28974))+32) = (OOC_INT64)0;
l4:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 29047)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i2 = (OOC_INT64)obj;
  i3 = i2==(OOC_INT64)0;
  if (i3) goto l7;
  *(OOC_INT64*)((_check_pointer(i0, 29128))+40) = (_type_guard(i2, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 29142)))), &_td_OOC_Doc__ItemDesc, 29142));
  goto l8;
l7:
  *(OOC_INT64*)((_check_pointer(i0, 29098))+40) = (OOC_INT64)0;
l8:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 29162)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l11;
  *(OOC_INT64*)((_check_pointer(i0, 29247))+48) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 29265)))), &_td_OOC_Doc__BlockElementDesc, 29265));
  goto l12;
l11:
  *(OOC_INT64*)((_check_pointer(i0, 29213))+48) = (OOC_INT64)0;
l12:
  return;
  ;
}

static void OOC_Doc__InitEnumerate(OOC_Doc__Enumerate e, OOC_CHAR8 padAfter, OOC_INT8 mode, OOC_INT32 start, OOC_Doc__Item text, OOC_Doc__BlockElement itemList) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)e;
  i1 = padAfter;
  OOC_Doc__InitBlockElement((OOC_Doc__BlockElement)i0, i1);
  i1 = mode;
  *(OOC_INT8*)((_check_pointer(i0, 29528))+32) = i1;
  i1 = start;
  *(OOC_INT32*)((_check_pointer(i0, 29549))+36) = i1;
  i1 = (OOC_INT64)text;
  *(OOC_INT64*)((_check_pointer(i0, 29572))+40) = i1;
  i1 = (OOC_INT64)itemList;
  *(OOC_INT64*)((_check_pointer(i0, 29593))+48) = i1;
  return;
  ;
}

OOC_Doc__Enumerate OOC_Doc__NewEnumerate(OOC_CHAR8 padAfter, OOC_INT8 mode, OOC_INT32 start, OOC_Doc__Item text, OOC_Doc__BlockElement itemList) {
  register OOC_INT64 i0,i1,i2,i3,i4,i5;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__Enumerate.baseTypes[0]);
  i1 = padAfter;
  i2 = mode;
  i3 = start;
  i4 = (OOC_INT64)text;
  i5 = (OOC_INT64)itemList;
  OOC_Doc__InitEnumerate((OOC_Doc__Enumerate)i0, i1, i2, i3, (OOC_Doc__Item)i4, (OOC_Doc__BlockElement)i5);
  return (OOC_Doc__Enumerate)i0;
  ;
}

void OOC_Doc__EnumerateDesc_NodeName(OOC_Doc__Enumerate e, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"enumerate",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__EnumerateDesc_Normalize(OOC_Doc__Enumerate e) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)e;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 30100))+40);
  i1 = i1!=(OOC_INT64)0;
  if (!i1) goto l4;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 30126))+40);
  OOC_Doc__ItemDesc_Normalize((OOC_Doc__Item)i1);
l4:
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 30178))+48);
  OOC_Doc__NormalizeBlockList((OOC_Doc__BlockElement)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 30214))+48);
  OOC_Doc__NoPadLastElement((OOC_Doc__BlockElement)i0);
  return;
  ;
}

void OOC_Doc__EnumerateDesc_Store(OOC_Doc__Enumerate e, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)e;
  i1 = (OOC_INT64)w;
  OOC_Doc__BlockElementDesc_Store((OOC_Doc__BlockElement)i0, (ADT_Storable__Writer)i1);
  i2 = *(OOC_INT8*)((_check_pointer(i0, 30360))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 30346)))), IO_BinaryRider__WriterDesc_WriteSInt)),IO_BinaryRider__WriterDesc_WriteSInt)((IO_BinaryRider__Writer)i1, i2);
  i2 = *(OOC_INT32*)((_check_pointer(i0, 30387))+36);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 30374)))), IO_BinaryRider__WriterDesc_WriteNum)),IO_BinaryRider__WriterDesc_WriteNum)((IO_BinaryRider__Writer)i1, i2);
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 30418))+40);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 30402)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i2);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 30448))+48);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 30432)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__EnumerateDesc_Load(OOC_Doc__Enumerate e, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2,i3;
  Object__Object obj;

  i0 = (OOC_INT64)e;
  i1 = (OOC_INT64)r;
  OOC_Doc__BlockElementDesc_Load((OOC_Doc__BlockElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 30604)))), IO_BinaryRider__ReaderDesc_ReadSInt)),IO_BinaryRider__ReaderDesc_ReadSInt)((IO_BinaryRider__Reader)i1, (void*)((_check_pointer(i0, 30617))+32));
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 30631)))), IO_BinaryRider__ReaderDesc_ReadNum)),IO_BinaryRider__ReaderDesc_ReadNum)((IO_BinaryRider__Reader)i1, (void*)((_check_pointer(i0, 30643))+36));
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 30658)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i2 = (OOC_INT64)obj;
  i3 = i2==(OOC_INT64)0;
  if (i3) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 30739))+40) = (_type_guard(i2, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 30753)))), &_td_OOC_Doc__ItemDesc, 30753));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 30709))+40) = (OOC_INT64)0;
l4:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 30773)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l7;
  *(OOC_INT64*)((_check_pointer(i0, 30858))+48) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 30876)))), &_td_OOC_Doc__BlockElementDesc, 30876));
  goto l8;
l7:
  *(OOC_INT64*)((_check_pointer(i0, 30824))+48) = (OOC_INT64)0;
l8:
  return;
  ;
}

static void OOC_Doc__InitFirstColumn(OOC_Doc__FirstColumn fc, OOC_CHAR8 padAfter, OOC_Doc__InlineElement inlineText) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)fc;
  i1 = padAfter;
  OOC_Doc__InitBlockElement((OOC_Doc__BlockElement)i0, i1);
  i1 = (OOC_INT64)inlineText;
  *(OOC_INT64*)((_check_pointer(i0, 31055))+32) = i1;
  return;
  ;
}

OOC_Doc__FirstColumn OOC_Doc__NewFirstColumn(OOC_CHAR8 padAfter, OOC_Doc__InlineElement inlineText) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__FirstColumn.baseTypes[0]);
  i1 = padAfter;
  i2 = (OOC_INT64)inlineText;
  OOC_Doc__InitFirstColumn((OOC_Doc__FirstColumn)i0, i1, (OOC_Doc__InlineElement)i2);
  return (OOC_Doc__FirstColumn)i0;
  ;
}

void OOC_Doc__FirstColumnDesc_NodeName(OOC_Doc__FirstColumn fc, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"table-first-column",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__FirstColumnDesc_Normalize(OOC_Doc__FirstColumn fc) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)fc;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 31528))+32);
  OOC_Doc__StripInlineListWS((OOC_Doc__InlineElement)i1);
  OOC_Doc__NormalizeInlineList((void*)((_check_pointer(i0, 31570))+32));
  *(OOC_UINT8*)((_check_pointer(i0, 31591))+24) = 0u;
  return;
  ;
}

void OOC_Doc__FirstColumnDesc_Store(OOC_Doc__FirstColumn fc, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)fc;
  i1 = (OOC_INT64)w;
  OOC_Doc__BlockElementDesc_Store((OOC_Doc__BlockElement)i0, (ADT_Storable__Writer)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 31752))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 31735)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__FirstColumnDesc_Load(OOC_Doc__FirstColumn fc, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2;
  Object__Object obj;

  i0 = (OOC_INT64)fc;
  i1 = (OOC_INT64)r;
  OOC_Doc__BlockElementDesc_Load((OOC_Doc__BlockElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 31914)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 32003))+32) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 32023)))), &_td_OOC_Doc__InlineElementDesc, 32023));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 31966))+32) = (OOC_INT64)0;
l4:
  return;
  ;
}

static void OOC_Doc__InitTableRow(OOC_Doc__TableRow tr, OOC_CHAR8 padAfter, OOC_Doc__BlockElement firstColumnList, OOC_Doc__Item item) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)tr;
  i1 = padAfter;
  OOC_Doc__InitBlockElement((OOC_Doc__BlockElement)i0, i1);
  i1 = (OOC_INT64)firstColumnList;
  *(OOC_INT64*)((_check_pointer(i0, 32236))+32) = i1;
  i1 = (OOC_INT64)item;
  *(OOC_INT64*)((_check_pointer(i0, 32280))+40) = i1;
  return;
  ;
}

OOC_Doc__TableRow OOC_Doc__NewTableRow(OOC_CHAR8 padAfter, OOC_Doc__BlockElement firstColumnList, OOC_Doc__Item item) {
  register OOC_INT64 i0,i1,i2,i3;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__TableRow.baseTypes[0]);
  i1 = padAfter;
  i2 = (OOC_INT64)firstColumnList;
  i3 = (OOC_INT64)item;
  OOC_Doc__InitTableRow((OOC_Doc__TableRow)i0, i1, (OOC_Doc__BlockElement)i2, (OOC_Doc__Item)i3);
  return (OOC_Doc__TableRow)i0;
  ;
}

void OOC_Doc__TableRowDesc_NodeName(OOC_Doc__TableRow tr, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"table-row",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__TableRowDesc_Normalize(OOC_Doc__TableRow tr) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)tr;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 32762))+32);
  OOC_Doc__NormalizeBlockList((OOC_Doc__BlockElement)i1);
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 32788))+40);
  OOC_Doc__ItemDesc_Normalize((OOC_Doc__Item)i1);
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 32813))+40);
  *(OOC_UINT8*)((_check_pointer(i1, 32819))+24) = 0u;
  *(OOC_UINT8*)((_check_pointer(i0, 32846))+24) = 1u;
  return;
  ;
}

void OOC_Doc__TableRowDesc_Store(OOC_Doc__TableRow tr, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)tr;
  i1 = (OOC_INT64)w;
  OOC_Doc__BlockElementDesc_Store((OOC_Doc__BlockElement)i0, (ADT_Storable__Writer)i1);
  i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 33003))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 32986)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i2);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 33045))+40);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 33028)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__TableRowDesc_Load(OOC_Doc__TableRow tr, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2,i3;
  Object__Object obj;

  i0 = (OOC_INT64)tr;
  i1 = (OOC_INT64)r;
  OOC_Doc__BlockElementDesc_Load((OOC_Doc__BlockElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 33199)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i2 = (OOC_INT64)obj;
  i3 = i2==(OOC_INT64)0;
  if (i3) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 33293))+32) = (_type_guard(i2, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 33318)))), &_td_OOC_Doc__BlockElementDesc, 33318));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 33251))+32) = (OOC_INT64)0;
l4:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 33346)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l7;
  *(OOC_INT64*)((_check_pointer(i0, 33429))+40) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 33443)))), &_td_OOC_Doc__ItemDesc, 33443));
  goto l8;
l7:
  *(OOC_INT64*)((_check_pointer(i0, 33398))+40) = (OOC_INT64)0;
l8:
  return;
  ;
}

static void OOC_Doc__InitTable(OOC_Doc__Table t, OOC_CHAR8 padAfter, OOC_Doc__BlockElement rowList) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)t;
  i1 = padAfter;
  OOC_Doc__InitBlockElement((OOC_Doc__BlockElement)i0, i1);
  i1 = (OOC_INT64)rowList;
  *(OOC_INT64*)((_check_pointer(i0, 33595))+32) = i1;
  return;
  ;
}

OOC_Doc__Table OOC_Doc__NewTable(OOC_CHAR8 padAfter, OOC_Doc__BlockElement rowList) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__Table.baseTypes[0]);
  i1 = padAfter;
  i2 = (OOC_INT64)rowList;
  OOC_Doc__InitTable((OOC_Doc__Table)i0, i1, (OOC_Doc__BlockElement)i2);
  return (OOC_Doc__Table)i0;
  ;
}

void OOC_Doc__TableDesc_NodeName(OOC_Doc__Table t, OOC_CHAR8 name[], OOC_LEN name_0d) {

  _copy_8((const void*)"table",(void*)(OOC_INT64)name,name_0d);
  return;
  ;
}

void OOC_Doc__TableDesc_Normalize(OOC_Doc__Table t) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)t;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 33988))+32);
  OOC_Doc__NormalizeBlockList((OOC_Doc__BlockElement)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 34023))+32);
  OOC_Doc__NoPadLastElement((OOC_Doc__BlockElement)i0);
  return;
  ;
}

void OOC_Doc__TableDesc_Store(OOC_Doc__Table t, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)t;
  i1 = (OOC_INT64)w;
  OOC_Doc__BlockElementDesc_Store((OOC_Doc__BlockElement)i0, (ADT_Storable__Writer)i1);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 34166))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 34150)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i1, (Object__Object)i0);
  return;
  ;
}

void OOC_Doc__TableDesc_Load(OOC_Doc__Table t, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2;
  Object__Object obj;

  i0 = (OOC_INT64)t;
  i1 = (OOC_INT64)r;
  OOC_Doc__BlockElementDesc_Load((OOC_Doc__BlockElement)i0, (ADT_Storable__Reader)i1);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 34317)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i1, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l3;
  *(OOC_INT64*)((_check_pointer(i0, 34401))+32) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 34418)))), &_td_OOC_Doc__BlockElementDesc, 34418));
  goto l4;
l3:
  *(OOC_INT64*)((_check_pointer(i0, 34368))+32) = (OOC_INT64)0;
l4:
  return;
  ;
}

static OOC_Doc__InlineElement OOC_Doc__ExtractSummary(OOC_Doc__BlockElement block) {
  register OOC_INT64 i0,i1;
  OOC_CHAR8 done;
  auto OOC_Doc__InlineElement OOC_Doc__ExtractSummary_Extract(OOC_Doc__InlineElement inlineList);
    
    OOC_Doc__InlineElement OOC_Doc__ExtractSummary_Extract(OOC_Doc__InlineElement inlineList) {
      register OOC_INT64 i0,i1,i2,i3,i4;
      OOC_Doc__InlineList resultList;
      OOC_Doc__InlineElement _inline;
      OOC_Doc__Text newText;
      OOC_INT32 i;
      auto OOC_INT32 OOC_Doc__ExtractSummary_Extract_EndOfSummary(OOC_CHAR8 str[], OOC_LEN str_0d);
        
        OOC_INT32 OOC_Doc__ExtractSummary_Extract_EndOfSummary(OOC_CHAR8 str[], OOC_LEN str_0d) {
          register OOC_INT64 i0,i1;

          i = 0;
          i0 = *(OOC_UINT8*)((OOC_INT64)str+(_check_index(0, str_0d, OOC_UINT32, 34828)));
          i0 = i0!=0u;
          if (!i0) goto l15;
          i0=0;
l3_loop:
          i1 = *(OOC_UINT8*)((OOC_INT64)str+(_check_index(i0, str_0d, OOC_UINT32, 34858)));
          i0 = i0+1;
          i1 = i1==46u;
          if (i1) goto l6;
          i1=0u;
          goto l8;
l6:
          i1 = *(OOC_UINT8*)((OOC_INT64)str+(_check_index(i0, str_0d, OOC_UINT32, 34875)));
          i1 = i1==32u;
          
l8:
          if (!i1) goto l10;
          return i0;
l10:
          i = i0;
          i1 = *(OOC_UINT8*)((OOC_INT64)str+(_check_index(i0, str_0d, OOC_UINT32, 34828)));
          i1 = i1!=0u;
          if (i1) goto l3_loop;
l15:
          return (-1);
          ;
        }


      i0 = (OOC_INT64)OOC_Doc__NewInlineList();
      resultList = (OOC_Doc__InlineList)i0;
      i0 = (OOC_INT64)inlineList;
      _inline = (OOC_Doc__InlineElement)i0;
      i1 = i0!=(OOC_INT64)0;
      if (i1) goto l3;
      i1=0u;
      goto l5;
l3:
      i1 = done;
      i1 = !i1;
      
l5:
      if (!i1) goto l43;
      i1 = (OOC_INT64)&_td_OOC_Doc__Position;
      
l7_loop:
      i2 = OOC_TYPE_TEST(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 35141)))), &_td_OOC_Doc__GlyphDesc);
      if (i2) goto l33;
      i2 = OOC_TYPE_TEST(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 35223)))), &_td_OOC_Doc__TextDesc);
      if (i2) goto l28;
      i2 = OOC_TYPE_TEST(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 35502)))), &_td_OOC_Doc__OberonRefDesc);
      if (i2) goto l26;
      i2 = OOC_TYPE_TEST(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 35785)))), &_td_OOC_Doc__MarkedInlineDesc);
      if (i2) goto l24;
      i2 = OOC_TYPE_TEST(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 35958)))), &_td_OOC_Doc__EmailDesc);
      if (i2) goto l22;
      i2 = OOC_TYPE_TEST(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 36062)))), &_td_OOC_Doc__UrefDesc);
      if (i2) goto l20;
      _failed_with(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 36054)))), 36054);
      goto l34;
l20:
      i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 36117))+24);
      i3 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 36130))+32);
      i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 36183))+40);
      i0 = (OOC_INT64)OOC_Doc__NewUref((OOC_Doc__InlineElement)i2, (OOC_Doc__InlineElement)i3, (OOC_Doc__InlineElement)i0);
      i2 = (OOC_INT64)resultList;
      OOC_Doc__InlineListDesc_Append((OOC_Doc__InlineList)i2, (OOC_Doc__InlineElement)i0);
      goto l34;
l22:
      i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 36015))+24);
      i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 36032))+32);
      i0 = (OOC_INT64)OOC_Doc__NewEmail((OOC_Doc__InlineElement)i2, (OOC_Doc__InlineElement)i0);
      i2 = (OOC_INT64)resultList;
      OOC_Doc__InlineListDesc_Append((OOC_Doc__InlineList)i2, (OOC_Doc__InlineElement)i0);
      goto l34;
l24:
      i2 = *(OOC_INT32*)((_check_pointer(i0, 35856))+24);
      i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 35926))+32);
      i0 = (OOC_INT64)OOC_Doc__ExtractSummary_Extract((OOC_Doc__InlineElement)i0);
      i0 = (OOC_INT64)OOC_Doc__NewMarkedInline(i2, (OOC_Doc__InlineElement)i0);
      i2 = (OOC_INT64)resultList;
      OOC_Doc__InlineListDesc_Append((OOC_Doc__InlineList)i2, (OOC_Doc__InlineElement)i0);
      goto l34;
l26:
      i2 = *(OOC_INT32*)((_check_pointer(i0, 35567))+24);
      i3 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 35634))+32);
      i3 = (OOC_INT64)OOC_Doc__ExtractSummary_Extract((OOC_Doc__InlineElement)i3);
      i4 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 35699))+40);
      i2 = (OOC_INT64)OOC_Doc__NewOberonRef(i2, (OOC_Doc__InlineElement)i3, (ADT_Storable__Object)i4);
      i3 = (OOC_INT64)resultList;
      OOC_Doc__InlineListDesc_Append((OOC_Doc__InlineList)i3, (OOC_Doc__InlineElement)i2);
      i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i3, 35731))+8);
      _copy_block((_check_pointer(i0, 35763)),(_check_pointer((_type_guard(i2, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i2, 35738)))), &_td_OOC_Doc__OberonRefDesc, 35738)), 35748)),12);
      goto l34;
l28:
      i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 35269))+24);
      i3 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 35269))+24);
      i4 = _check_pointer(i0, 35286);
      i3 = OOC_ARRAY_LENGTH((_check_pointer(i3, 35277)), 0);
      i0 = (OOC_INT64)OOC_Doc__NewText((void*)(_check_pointer(i2, 35277)), i3, (void*)(_check_pointer(i0, 35286)), (RT0__Struct)i1);
      newText = (OOC_Doc__Text)i0;
      i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 35330))+24);
      i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 35330))+24);
      i0 = OOC_ARRAY_LENGTH((_check_pointer(i0, 35338)), 0);
      i0 = OOC_Doc__ExtractSummary_Extract_EndOfSummary((void*)(_check_pointer(i2, 35338)), i0);
      i = i0;
      i2 = i0>=0;
      if (!i2) goto l31;
      i2 = (OOC_INT64)newText;
      i2 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i2, 35388))+24);
      i2 = _check_pointer(i2, 35396);
      i3 = OOC_ARRAY_LENGTH(i2, 0);
      *(OOC_UINT8*)(i2+(_check_index(i0, i3, OOC_UINT32, 35396))) = 0u;
      done = 1u;
l31:
      i0 = (OOC_INT64)newText;
      i2 = (OOC_INT64)resultList;
      OOC_Doc__InlineListDesc_Append((OOC_Doc__InlineList)i2, (OOC_Doc__InlineElement)i0);
      goto l34;
l33:
      i0 = *(OOC_INT32*)((_check_pointer(i0, 35198))+24);
      i0 = (OOC_INT64)OOC_Doc__NewGlyph(i0);
      i2 = (OOC_INT64)resultList;
      OOC_Doc__InlineListDesc_Append((OOC_Doc__InlineList)i2, (OOC_Doc__InlineElement)i0);
l34:
      i0 = (OOC_INT64)_inline;
      i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 36236))+16);
      _inline = (OOC_Doc__InlineElement)i0;
      i2 = i0!=(OOC_INT64)0;
      if (i2) goto l37;
      i2=0u;
      goto l39;
l37:
      i2 = done;
      i2 = !i2;
      
l39:
      if (i2) goto l7_loop;
l43:
      i0 = (OOC_INT64)resultList;
      i0 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i0, 36283));
      return (OOC_Doc__InlineElement)i0;
      ;
    }


  i0 = (OOC_INT64)block;
  i1 = i0!=(OOC_INT64)0;
  if (i1) goto l3;
  i1=0u;
  goto l5;
l3:
  i1 = OOC_TYPE_TEST(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 36348)))), &_td_OOC_Doc__ParagraphDesc);
  
l5:
  if (i1) goto l7;
  return (OOC_Doc__InlineElement)(OOC_INT64)0;
  goto l8;
l7:
  done = 0u;
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer((_type_guard(i0, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 36416)))), &_td_OOC_Doc__ParagraphDesc, 36416)), 36426))+32);
  i0 = (OOC_INT64)OOC_Doc__ExtractSummary_Extract((OOC_Doc__InlineElement)i0);
  return (OOC_Doc__InlineElement)i0;
l8:
  _failed_function(34464); return 0;
  ;
}

OOC_Doc__Document OOC_Doc__NewDocument(OOC_Doc__BlockElement blockList, OOC_Doc_Decoration__Decoration decoration, OOC_INT32 firstColumn) {
  register OOC_INT64 i0,i1;
  OOC_Doc__Document d;

  i0 = (OOC_INT64)RT0__NewObject(_td_OOC_Doc__Document.baseTypes[0]);
  d = (OOC_Doc__Document)i0;
  i1 = (OOC_INT64)blockList;
  *(OOC_INT64*)(_check_pointer(i0, 36712)) = i1;
  *(OOC_INT64*)((_check_pointer(i0, 36743))+8) = 0;
  i1 = (OOC_INT64)decoration;
  *(OOC_INT64*)((_check_pointer(i0, 36766))+16) = i1;
  i1 = firstColumn;
  *(OOC_INT32*)((_check_pointer(i0, 36799))+24) = i1;
  *(OOC_INT64*)((_check_pointer(i0, 36834))+32) = 0;
  return (OOC_Doc__Document)i0;
  ;
}

void OOC_Doc__DocumentDesc_AddUsedImport(OOC_Doc__Document d, ADT_Storable__Object importDecl) {
  register OOC_INT64 i0,i1,i2,i3,i4,i5;
  OOC_INT32 i;

  i0 = (OOC_INT64)d;
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 37002))+32);
  i1 = i1==(OOC_INT64)0;
  if (!i1) goto l3;
  i1 = (OOC_INT64)ADT_ArrayList__New(2);
  *(OOC_INT64*)((_check_pointer(i0, 37039))+32) = i1;
l3:
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 37106))+32);
  i = 0;
  i1 = *(OOC_INT32*)((_check_pointer(i1, 37123))+8);
  i2 = (OOC_INT64)importDecl;
  i3 = 0<i1;
  if (!i3) goto l14;
  i3=0;
l6_loop:
  i4 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 37146))+32);
  i4 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i4, 37163));
  i4 = _check_pointer(i4, 37170);
  i5 = OOC_ARRAY_LENGTH(i4, 0);
  i4 = (OOC_INT64)*(OOC_INT64*)(i4+(_check_index(i3, i5, OOC_UINT32, 37170))*8);
  i4 = i4==i2;
  if (!i4) goto l9;
  return;
l9:
  i3 = i3+1;
  i = i3;
  i4 = i3<i1;
  if (i4) goto l6_loop;
l14:
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 37232))+32);
  i0 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i0, 37232))+32);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 37249)))), ADT_ArrayList__ArrayListDesc_Append)),ADT_ArrayList__ArrayListDesc_Append)((ADT_ArrayList__ArrayList)i0, (Object__Object)i2);
  return;
  ;
}

void OOC_Doc__DocumentDesc_Store(OOC_Doc__Document d, ADT_Storable__Writer w) {
  register OOC_INT64 i0,i1,i2;

  i0 = (OOC_INT64)w;
  i1 = (OOC_INT64)d;
  i2 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i1, 37391));
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 37375)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i0, (Object__Object)i2);
  i1 = (OOC_INT64)*(OOC_INT64*)((_check_pointer(i1, 37426))+8);
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 37410)))), ADT_Storable__WriterDesc_WriteObject)),ADT_Storable__WriterDesc_WriteObject)((ADT_Storable__Writer)i0, (Object__Object)i1);
  return;
  ;
}

void OOC_Doc__DocumentDesc_Load(OOC_Doc__Document d, ADT_Storable__Reader r) {
  register OOC_INT64 i0,i1,i2;
  Object__Object obj;

  i0 = (OOC_INT64)r;
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 37629)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i0, (void*)(OOC_INT64)&obj);
  i1 = (OOC_INT64)obj;
  i2 = i1==(OOC_INT64)0;
  if (i2) goto l3;
  i2 = (OOC_INT64)d;
  *(OOC_INT64*)(_check_pointer(i2, 37715)) = (_type_guard(i1, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i1, 37734)))), &_td_OOC_Doc__BlockElementDesc, 37734));
  i1=i2;
  goto l4;
l3:
  i1 = (OOC_INT64)d;
  *(OOC_INT64*)(_check_pointer(i1, 37680)) = (OOC_INT64)0;
  
l4:
  OOC_TBCALL(((OOC_INT64)OOC_TBPROC_ADR(((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 37762)))), ADT_Storable__ReaderDesc_ReadObject)),ADT_Storable__ReaderDesc_ReadObject)((ADT_Storable__Reader)i0, (void*)(OOC_INT64)&obj);
  i0 = (OOC_INT64)obj;
  i2 = i0==(OOC_INT64)0;
  if (i2) goto l7;
  *(OOC_INT64*)((_check_pointer(i1, 37846))+8) = (_type_guard(i0, ((OOC_INT64)OOC_TYPE_TAG((_check_pointer(i0, 37863)))), &_td_OOC_Doc__InlineElementDesc, 37863));
  goto l8;
l7:
  *(OOC_INT64*)((_check_pointer(i1, 37813))+8) = (OOC_INT64)0;
l8:
  *(OOC_INT64*)((_check_pointer(i1, 37892))+16) = (OOC_INT64)0;
  *(OOC_INT32*)((_check_pointer(i1, 37918))+24) = 0;
  *(OOC_INT64*)((_check_pointer(i1, 37943))+32) = (OOC_INT64)0;
  return;
  ;
}

void OOC_Doc__DocumentDesc_Normalize(OOC_Doc__Document doc) {
  register OOC_INT64 i0,i1;

  i0 = (OOC_INT64)doc;
  i1 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i0, 38055));
  OOC_Doc__NormalizeBlockList((OOC_Doc__BlockElement)i1);
  i1 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i0, 38108));
  i1 = (OOC_INT64)OOC_Doc__ExtractSummary((OOC_Doc__BlockElement)i1);
  *(OOC_INT64*)((_check_pointer(i0, 38076))+8) = i1;
  return;
  ;
}

void OOC_Doc__DocumentDesc_Merge(OOC_Doc__Document doc, OOC_Doc__Document source) {
  register OOC_INT64 i0,i1;
  OOC_Doc__BlockElement last;

  i0 = (OOC_INT64)doc;
  i1 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i0, 38241));
  i1 = i1==0;
  if (i1) goto l3;
  i0 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i0, 38351));
  i0 = (OOC_INT64)OOC_Doc__LastBlockElement((OOC_Doc__BlockElement)i0);
  last = (OOC_Doc__BlockElement)i0;
  i1 = (OOC_INT64)source;
  i1 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i1, 38396));
  *(OOC_INT64*)((_check_pointer(i0, 38375))+16) = i1;
  goto l4;
l3:
  i1 = (OOC_INT64)source;
  i1 = (OOC_INT64)*(OOC_INT64*)(_check_pointer(i1, 38295));
  *(OOC_INT64*)(_check_pointer(i0, 38274)) = i1;
l4:
  return;
  ;
}

void OOC_OOC_Doc_init(void) {

  return;
  ;
}

/* --- */
