// File: /workspace/github_cpp_makefile_star2_O1/jstaursky[P]hutch/src/Sleigh/slgh_compile.cc
// Function: SleighCompile::newSpace(SpaceQuality*)
void SleighCompile::newSpace(SpaceQuality *qual)

{
  if (qual->size == 0) {
    reportError("Space definition missing size attribute",true);
    delete qual;
    return;
  }

  int4 delay = (qual->type == SpaceQuality::registertype) ? 0 : 1;
  AddrSpace *spc = new AddrSpace(this,this,IPTR_PROCESSOR,qual->name,qual->size,qual->wordsize,numSpaces(),AddrSpace::hasphysical,delay);
  insertSpace(spc);
  if (qual->isdefault) {
    if (getDefaultSpace() != (AddrSpace *)0)
      reportError("Multiple default spaces",true);
    else {
      setDefaultSpace(spc->getIndex());	// Make the flagged space the default
      pcode.setDefaultSpace(spc);
    }
  }
  delete qual;
  addSymbol( new SpaceSymbol(spc) );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl 0x24(%rsi), %ebp
testl %ebp, %ebp
je 0x2fe1b
xorl %r12d, %r12d
cmpl $0x1, 0x20(%rbx)
setne %r12b
movl $0x70, %edi
callq 0xf370
movq %rax, %r15
movl 0x28(%rbx), %eax
movq 0x10(%r14), %r10
subq 0x8(%r14), %r10
shrq $0x3, %r10
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
movl $0x1, %ecx
movq %rbx, %r8
movl %ebp, %r9d
pushq %r12
pushq $0x100                  # imm = 0x100
pushq %r10
pushq %rax
callq 0x53590
addq $0x20, %rsp
movq %r14, %rdi
movq %r15, %rsi
callq 0x57698
cmpb $0x1, 0x2c(%rbx)
jne 0x2fea2
cmpq $0x0, 0xa0(%r14)
je 0x2fe8f
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x326cc(%rip), %rsi     # 0x624a9
leaq 0x326dc(%rip), %rdx     # 0x624c0
movq %rsp, %rdi
callq 0x1183c
movq %rsp, %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x2d276
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2fea2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xf380
jmp 0x2fea2
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x32656(%rip), %rsi     # 0x62481
leaq 0x32676(%rip), %rdx     # 0x624a8
movq %rsp, %rdi
callq 0x1183c
movq %rsp, %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x2d276
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2fe60
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xf380
testq %rbx, %rbx
je 0x2fefd
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x2fe80
movq (%rax), %rsi
incq %rsi
callq 0xf380
movl $0x30, %esi
movq %rbx, %rdi
callq 0xf380
jmp 0x2fefd
movl 0x60(%r15), %esi
movq %r14, %rdi
callq 0x57cf2
movq %r15, 0x1e8(%r14)
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x2feb9
movq (%rax), %rsi
incq %rsi
callq 0xf380
movl $0x30, %esi
movq %rbx, %rdi
callq 0xf380
movl $0x38, %edi
callq 0xf370
movq %rax, %r12
movq %r15, %rsi
addq $0x38, %rsi
movq %rax, %rdi
callq 0x202ec
leaq 0x5a987(%rip), %rax     # 0x8a870
movq %rax, (%r12)
movq %r15, 0x30(%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x2da5a
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x2ff26
jmp 0x2ff52
jmp 0x2ff30
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2ff52
movq 0x10(%rsp), %rsi
incq %rsi
jmp 0x2ff4d
movq %rax, %rbx
jmp 0x2ff52
movq %rax, %rbx
movl $0x38, %esi
movq %r12, %rdi
jmp 0x2ff4d
movq %rax, %rbx
movl $0x70, %esi
movq %r15, %rdi
callq 0xf380
movq %rbx, %rdi
callq 0xf730