// File: /workspace/github_cpp_makefile_star2_O3/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 0x2fb70
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 0x53724
addq $0x20, %rsp
movq %r14, %rdi
movq %r15, %rsi
callq 0x5781e
cmpb $0x1, 0x2c(%rbx)
jne 0x2fbee
cmpq $0x0, 0xa0(%r14)
je 0x2fbdb
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x329c4(%rip), %rsi     # 0x624f9
leaq 0x329d4(%rip), %rdx     # 0x62510
movq %rsp, %rdi
callq 0x117f6
movq %rsp, %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x2d000
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x2fbee
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xf380
jmp 0x2fbee
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x32951(%rip), %rsi     # 0x624d1
leaq 0x32971(%rip), %rdx     # 0x624f8
movq %rsp, %rdi
callq 0x117f6
movq %rsp, %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x2d000
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2fbb5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xf380
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x2fbcc
movq (%rax), %rsi
incq %rsi
callq 0xf380
movl $0x30, %esi
movq %rbx, %rdi
callq 0xf380
jmp 0x2fc49
movl 0x60(%r15), %esi
movq %r14, %rdi
callq 0x57e8a
movq %r15, 0x1e8(%r14)
movq (%rbx), %rdi
leaq 0x10(%rbx), %rax
cmpq %rax, %rdi
je 0x2fc05
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 0x20362
leaq 0x5acdb(%rip), %rax     # 0x8a910
movq %rax, (%r12)
movq %r15, 0x30(%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x2d7f2
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x2fc72
jmp 0x2fc9e
jmp 0x2fc7c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2fc9e
movq 0x10(%rsp), %rsi
incq %rsi
jmp 0x2fc99
movq %rax, %rbx
jmp 0x2fc9e
movq %rax, %rbx
movl $0x38, %esi
movq %r12, %rdi
jmp 0x2fc99
movq %rax, %rbx
movl $0x70, %esi
movq %r15, %rdi
callq 0xf380
movq %rbx, %rdi
callq 0xf730