// File: /workspace/github_cpp_makefile_star2_O2/jstaursky[P]hutch/src/Sleigh/space.cc
// Function: AddrSpace::restoreXml(Element const*)
void AddrSpace::restoreXml(const Element *el)

{
  int4 numAttribs = el->getNumAttributes();
  deadcodedelay = -1;
  for (int4 i=0; i < numAttribs; i++) {
    string attrName = el->getAttributeName(i);
    string attrValue = el->getAttributeValue(i);
    
    if (attrName == "name") {
      name = attrValue;
    }
    if (attrName == "index")
      {
	istringstream s1(attrValue);
	s1.unsetf(ios::dec | ios::hex | ios::oct);
	s1 >> index;
      }
    if (attrName == "size")
      {
	istringstream s1(attrValue);
	s1.unsetf(ios::dec | ios::hex | ios::oct);
	s1 >> addressSize;
      }
    if (attrName == "wordsize")
      {
	istringstream s1(attrValue);
	s1.unsetf(ios::dec | ios::hex | ios::oct);
	s1 >> wordsize;
      }
    if (attrName == "bigendian") {
      if (xml_readbool(attrValue))
	flags |= big_endian;
    }
    if (attrName == "delay") {
      istringstream s1(attrValue);
      s1.unsetf(ios::dec | ios::hex | ios::oct);
      s1 >> delay;
    }
    if (attrName == "deadcodedelay") {
      istringstream s1(attrValue);
      s1.unsetf(ios::dec | ios::hex | ios::oct);
      s1 >> deadcodedelay;
    }      
    if (attrName == "physical") {
      if (xml_readbool(attrValue))
	flags |= hasphysical;
    }
    
  }
  if (deadcodedelay == -1)
    deadcodedelay = delay;	// If deadcodedelay attribute not present, set it to delay
  calcScaleMask();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r14
movq 0x48(%rsi), %rax
subq 0x40(%rsi), %rax
orl $-0x1, 0x68(%rdi)
shrq $0x5, %rax
leaq 0x68(%rdi), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x38(%rsp)
leaq 0x60(%rdi), %rcx
movq %rcx, 0x30(%rsp)
leaq 0x58(%rdi), %rcx
movq %rcx, 0x28(%rsp)
leaq 0x5c(%rdi), %rcx
movq %rcx, 0x20(%rsp)
movq %rdi, 0x8(%rsp)
leaq 0x64(%rdi), %rcx
movq %rcx, 0x10(%rsp)
xorl %ebx, %ebx
testl %eax, %eax
cmovlel %ebx, %eax
shlq $0x5, %rax
movq %rax, 0x40(%rsp)
leaq 0x68(%rsp), %r13
leaq 0x48(%rsp), %rbp
leaq 0x88(%rsp), %r12
pushq $0x8
popq %r15
cmpq %rbx, 0x40(%rsp)
je 0x581f7
movq 0x40(%r14), %rsi
addq %rbx, %rsi
movq %r13, %rdi
callq 0x50630
movq 0x58(%r14), %rsi
addq %rbx, %rsi
movq %rbp, %rdi
callq 0x50630
movq %r13, %rdi
leaq 0x2e02b(%rip), %rsi     # 0x86031
callq 0x520f0
testb %al, %al
je 0x5801c
movq 0x38(%rsp), %rdi
movq %rbp, %rsi
callq 0x4e400
movq %r13, %rdi
leaq 0x2e700(%rip), %rsi     # 0x86726
callq 0x520f0
testb %al, %al
je 0x58066
movq %r12, %rdi
movq %rbp, %rsi
movl %r15d, %edx
callq 0x51500
movq 0x88(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0xa0(%rsp,%rax)
movq %r12, %rdi
movq 0x30(%rsp), %rsi
callq 0x4e750
movq %r12, %rdi
callq 0x4e070
movq %r13, %rdi
leaq 0x346fd(%rip), %rsi     # 0x8c76d
callq 0x520f0
testb %al, %al
je 0x580b0
movq %r12, %rdi
movq %rbp, %rsi
movl %r15d, %edx
callq 0x51500
movq 0x88(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0xa0(%rsp,%rax)
movq %r12, %rdi
movq 0x28(%rsp), %rsi
callq 0x51830
movq %r12, %rdi
callq 0x4e070
movq %r13, %rdi
leaq 0x2e68a(%rip), %rsi     # 0x86744
callq 0x520f0
testb %al, %al
je 0x580fa
movq %r12, %rdi
movq %rbp, %rsi
movl %r15d, %edx
callq 0x51500
movq 0x88(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0xa0(%rsp,%rax)
movq %r12, %rdi
movq 0x20(%rsp), %rsi
callq 0x51830
movq %r12, %rdi
callq 0x4e070
movq %r13, %rdi
leaq 0x2e628(%rip), %rsi     # 0x8672c
callq 0x520f0
testb %al, %al
je 0x58122
movq %rbp, %rdi
callq 0x4fb70
testb %al, %al
je 0x58122
movq 0x8(%rsp), %rax
orb $0x1, 0x24(%rax)
movq %r13, %rdi
leaq 0x2e612(%rip), %rsi     # 0x8673e
callq 0x520f0
testb %al, %al
je 0x5816c
movq %r12, %rdi
movq %rbp, %rsi
movl %r15d, %edx
callq 0x51500
movq 0x88(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0xa0(%rsp,%rax)
movq %r12, %rdi
movq 0x10(%rsp), %rsi
callq 0x4e750
movq %r12, %rdi
callq 0x4e070
movq %r13, %rdi
leaq 0x2e5c0(%rip), %rsi     # 0x86736
callq 0x520f0
testb %al, %al
je 0x581b6
movq %r12, %rdi
movq %rbp, %rsi
movl %r15d, %edx
callq 0x51500
movq 0x88(%rsp), %rax
movq -0x18(%rax), %rax
andl $-0x4b, 0xa0(%rsp,%rax)
movq %r12, %rdi
movq 0x18(%rsp), %rsi
callq 0x4e750
movq %r12, %rdi
callq 0x4e070
movq %r13, %rdi
leaq 0x2e58d(%rip), %rsi     # 0x8674d
callq 0x520f0
testb %al, %al
je 0x581de
movq %rbp, %rdi
callq 0x4fb70
testb %al, %al
je 0x581de
movq 0x8(%rsp), %rax
orb $0x1, 0x25(%rax)
movq %rbp, %rdi
callq 0x4e020
movq %r13, %rdi
callq 0x4e020
addq $0x20, %rbx
jmp 0x57fd3
movq 0x18(%rsp), %rcx
cmpl $-0x1, (%rcx)
jne 0x5820a
movq 0x10(%rsp), %rax
movl (%rax), %eax
movl %eax, (%rcx)
movq 0x8(%rsp), %rdi
callq 0x4e7c0
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x58230
jmp 0x58230
jmp 0x58230
jmp 0x58230
jmp 0x58230
movq %rax, %rbx
jmp 0x5824d
jmp 0x5823d
jmp 0x5823d
jmp 0x5823d
jmp 0x5823d
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0x4e070
leaq 0x48(%rsp), %rdi
callq 0x4e020
leaq 0x68(%rsp), %rdi
callq 0x4e020
movq %rbx, %rdi
callq 0x518c0
movq %rax, %rbx
jmp 0x58257