// File: devinsmith[P]qvdreader/QvdTableHeader.cpp
// Function: QvdTableHeader::ParseXml(_xmlNode const*)
void QvdTableHeader::ParseXml(const xmlNode *node)
{
  for (const xmlNode *child = node->children; child; child = child->next) {
    if (child->type == XML_ELEMENT_NODE) {
      xmlChar *nodeContent = xmlNodeGetContent(child);
      if (nodeContent == NULL)
        continue;

      if (strlen((char *)nodeContent) == 0) {
        xmlFree(nodeContent);
        continue;
      }

      if (strcmp((char *)child->name, "QvBuildNo") == 0) {
        QvBuildNo = (char *)nodeContent;
      } else if (strcmp((char *)child->name, "CreatorDoc") == 0) {
        CreatorDoc = (char *)nodeContent;
      } else if (strcmp((char *)child->name, "CreateUtcTime") == 0) {
        CreateUtcTime = (char *)nodeContent;
      } else if (strcmp((char *)child->name, "TableName") == 0) {
        TableName = (char *)nodeContent;
      } else if (strcmp((char *)child->name, "SourceFileSize") == 0) {
        SourceFileSize = atoi((char *)nodeContent);
      } else if (strcmp((char *)child->name, "RecordByteSize") == 0) {
        RecordByteSize = atoi((char *)nodeContent);
      } else if (strcmp((char *)child->name, "NoOfRecords") == 0) {
        NoOfRecords = atoi((char *)nodeContent);
      } else if (strcmp((char *)child->name, "Offset") == 0) {
        Offset = atoi((char *)nodeContent);
      } else if (strcmp((char *)child->name, "Length") == 0) {
        Length = atoi((char *)nodeContent);
      } else if (strcmp((char *)child->name, "Lineage") == 0) {
        ParseLineage(child);
      } else if (strcmp((char *)child->name, "Fields") == 0) {
        ParseFields(child);
      } else {
        printf("Unprocessed QvdTableHeader tag: %s\n", child->name);
      }

      xmlFree(nodeContent);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x10bf8
movq -0x18(%rbp), %rax
cmpl $0x1, 0x8(%rax)
jne 0x10be5
movq -0x18(%rbp), %rdi
callq 0xabb0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x10986
jmp 0x10be7
movq -0x20(%rbp), %rdi
callq 0xa4c0
cmpq $0x0, %rax
jne 0x109aa
movq 0x7644(%rip), %rax      # 0x17fe0
movq (%rax), %rax
movq -0x20(%rbp), %rdi
callq *%rax
jmp 0x10be7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x284a(%rip), %rsi      # 0x13203
callq 0xaf40
cmpl $0x0, %eax
jne 0x109d5
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xae60
jmp 0x10bd5
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x2829(%rip), %rsi      # 0x1320d
callq 0xaf40
cmpl $0x0, %eax
jne 0x10a04
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x20, %rdi
callq 0xae60
jmp 0x10bd3
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x2805(%rip), %rsi      # 0x13218
callq 0xaf40
cmpl $0x0, %eax
jne 0x10a33
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x40, %rdi
callq 0xae60
jmp 0x10bd1
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x27e4(%rip), %rsi      # 0x13226
callq 0xaf40
cmpl $0x0, %eax
jne 0x10a62
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x68, %rdi
callq 0xae60
jmp 0x10bcf
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x27bf(%rip), %rsi      # 0x13230
callq 0xaf40
cmpl $0x0, %eax
jne 0x10a92
movq -0x20(%rbp), %rdi
callq 0xb0b0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x60(%rax)
jmp 0x10bcd
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x279e(%rip), %rsi      # 0x1323f
callq 0xaf40
cmpl $0x0, %eax
jne 0x10ac5
movq -0x20(%rbp), %rdi
callq 0xb0b0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x88(%rax)
jmp 0x10bcb
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x277a(%rip), %rsi      # 0x1324e
callq 0xaf40
cmpl $0x0, %eax
jne 0x10af8
movq -0x20(%rbp), %rdi
callq 0xb0b0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8c(%rax)
jmp 0x10bc9
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x25ae(%rip), %rsi      # 0x130b5
callq 0xaf40
cmpl $0x0, %eax
jne 0x10b2b
movq -0x20(%rbp), %rdi
callq 0xb0b0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x90(%rax)
jmp 0x10bc7
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x259c(%rip), %rsi      # 0x130d6
callq 0xaf40
cmpl $0x0, %eax
jne 0x10b5b
movq -0x20(%rbp), %rdi
callq 0xb0b0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x94(%rax)
jmp 0x10bc5
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x26f0(%rip), %rsi      # 0x1325a
callq 0xaf40
cmpl $0x0, %eax
jne 0x10b83
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xad90
jmp 0x10bc3
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x26d0(%rip), %rsi      # 0x13262
callq 0xaf40
cmpl $0x0, %eax
jne 0x10bab
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa9c0
jmp 0x10bc1
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x26af(%rip), %rdi      # 0x13269
movb $0x0, %al
callq 0xa070
jmp 0x10bc3
jmp 0x10bc5
jmp 0x10bc7
jmp 0x10bc9
jmp 0x10bcb
jmp 0x10bcd
jmp 0x10bcf
jmp 0x10bd1
jmp 0x10bd3
jmp 0x10bd5
movq 0x7404(%rip), %rax      # 0x17fe0
movq (%rax), %rax
movq -0x20(%rbp), %rdi
callq *%rax
jmp 0x10be7
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x10954
addq $0x30, %rsp
popq %rbp
retq
nop