// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: build_node
static void
build_node(XML_Parser parser,
           int src_node,
           XML_Content *dest,
           XML_Content **contpos,
           XML_Char **strpos)
{
  DTD * const dtd = _dtd;  /* save one level of indirection */
  dest->type = dtd->scaffold[src_node].type;
  dest->quant = dtd->scaffold[src_node].quant;
  if (dest->type == XML_CTYPE_NAME) {
    const XML_Char *src;
    dest->name = *strpos;
    src = dtd->scaffold[src_node].name;
    for (;;) {
      *(*strpos)++ = *src;
      if (!*src)
        break;
      src++;
    }
    dest->numchildren = 0;
    dest->children = NULL;
  }
  else {
    unsigned int i;
    int cn;
    dest->numchildren = dtd->scaffold[src_node].childcnt;
    dest->children = *contpos;
    *contpos += dest->numchildren;
    for (i = 0, cn = dtd->scaffold[src_node].firstchild;
         i < dest->numchildren;
         i++, cn = dtd->scaffold[cn].nextsib) {
      build_node(parser, cn, &(dest->children[i]), contpos, strpos);
    }
    dest->name = NULL;
  }
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl %esi, 0x3c(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq 0x40(%rsp), %rax
movq 0x290(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x120(%rax), %rax
movslq 0x3c(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
movq 0x18(%rsp), %rax
movq 0x120(%rax), %rax
movslq 0x3c(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x30(%rsp), %rax
cmpl $0x4, (%rax)
jne 0x380f16
movq 0x20(%rsp), %rax
movq (%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x18(%rsp), %rax
movq 0x120(%rax), %rax
movslq 0x3c(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movb (%rax), %cl
movq 0x20(%rsp), %rdx
movq (%rdx), %rax
movq %rax, %rsi
addq $0x1, %rsi
movq %rsi, (%rdx)
movb %cl, (%rax)
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x380ee8
jmp 0x380ef8
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x380ec1
movq 0x30(%rsp), %rax
movl $0x0, 0x10(%rax)
movq 0x30(%rsp), %rax
movq $0x0, 0x18(%rax)
jmp 0x381000
movq 0x18(%rsp), %rax
movq 0x120(%rax), %rax
movslq 0x3c(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
movq 0x30(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rcx
movq 0x30(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x30(%rsp), %rax
movl 0x10(%rax), %edx
movq 0x28(%rsp), %rax
movq (%rax), %rcx
movl %edx, %edx
shlq $0x5, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movl $0x0, 0xc(%rsp)
movq 0x18(%rsp), %rax
movq 0x120(%rax), %rax
movslq 0x3c(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
movq 0x30(%rsp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x380ff3
movq 0x40(%rsp), %rdi
movl 0x8(%rsp), %esi
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rdx
movl 0xc(%rsp), %eax
shlq $0x5, %rax
addq %rax, %rdx
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %r8
callq 0x380e10
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rax
movq 0x120(%rax), %rax
movslq 0x8(%rsp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movl %eax, 0x8(%rsp)
jmp 0x380f8d
movq 0x30(%rsp), %rax
movq $0x0, 0x8(%rax)
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)