// File: /workspace/github_c_makefile_star2_O0/GregorR[P]lstg/source/memory.c
// Function: fileOut
int fileOut(FILE * fp)
{
  int             i;

  /*
     use the currently unused space for the indir pointers 
   */
  if(inSpaceOne)
  {
    indirArray = (struct object * *) spaceTwo;
    indirSize = spaceTwoSize;
  }
  else
  {
    indirArray = (struct object * *) spaceOne;
    indirSize = spaceOneSize;
  }
  indirtop = 0;

  /*
     write out the roots of the image file 
   */
  objectWrite(fp, nilObject);
  objectWrite(fp, trueObject);
  objectWrite(fp, falseObject);
  objectWrite(fp, globalsObject);
  objectWrite(fp, SmallIntClass);
  objectWrite(fp, IntegerClass);
  objectWrite(fp, ArrayClass);
  objectWrite(fp, BlockClass);
  objectWrite(fp, ContextClass);
  objectWrite(fp, StringClass);
  objectWrite(fp, initialMethod);
  for(i = 0; i < 3; i++)
  {
    objectWrite(fp, binaryMessages[i]);
  }
  objectWrite(fp, badMethodSym);
  printf("%d objects written in image\n", indirtop);

  /*
     clean up after ourselves 
   */
  memoryClear((char *) indirArray, indirSize * sizeof(struct object));
  return indirtop;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpl $0x0, 0x41ecd(%rip)     # 0x48a20
je 0x6b73
movq 0x41e8c(%rip), %rax     # 0x489e8
movq %rax, 0x4301d(%rip)     # 0x49b80
movq 0x41e86(%rip), %rax     # 0x489f0
movq %rax, 0x43017(%rip)     # 0x49b88
jmp 0x6b8f
movq 0x41e5e(%rip), %rax     # 0x489d8
movq %rax, 0x42fff(%rip)     # 0x49b80
movq 0x41e58(%rip), %rax     # 0x489e0
movq %rax, 0x42ff9(%rip)     # 0x49b88
movl $0x0, 0x42ff7(%rip)     # 0x49b90
movq -0x8(%rbp), %rdi
leaq 0x41d94(%rip), %rax     # 0x48938
movq (%rax), %rsi
callq 0x6cf0
movq -0x8(%rbp), %rdi
leaq 0x41d89(%rip), %rax     # 0x48940
movq (%rax), %rsi
callq 0x6cf0
movq -0x8(%rbp), %rdi
leaq 0x41d7e(%rip), %rax     # 0x48948
movq (%rax), %rsi
callq 0x6cf0
movq -0x8(%rbp), %rdi
leaq 0x41dcb(%rip), %rax     # 0x489a8
movq (%rax), %rsi
callq 0x6cf0
movq -0x8(%rbp), %rdi
leaq 0x41d70(%rip), %rax     # 0x48960
movq (%rax), %rsi
callq 0x6cf0
movq -0x8(%rbp), %rdi
leaq 0x41d95(%rip), %rax     # 0x48998
movq (%rax), %rsi
callq 0x6cf0
movq -0x8(%rbp), %rdi
leaq 0x41d3a(%rip), %rax     # 0x48950
movq (%rax), %rsi
callq 0x6cf0
movq -0x8(%rbp), %rdi
leaq 0x41d2f(%rip), %rax     # 0x48958
movq (%rax), %rsi
callq 0x6cf0
movq -0x8(%rbp), %rdi
leaq 0x41d34(%rip), %rax     # 0x48970
movq (%rax), %rsi
callq 0x6cf0
movq -0x8(%rbp), %rdi
leaq 0x41d51(%rip), %rax     # 0x489a0
movq (%rax), %rsi
callq 0x6cf0
movq -0x8(%rbp), %rdi
leaq 0x41d4e(%rip), %rax     # 0x489b0
movq (%rax), %rsi
callq 0x6cf0
movl $0x0, -0xc(%rbp)
cmpl $0x3, -0xc(%rbp)
jge 0x6c9a
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rcx
leaq 0x41cfa(%rip), %rax     # 0x48980
movq (%rax,%rcx,8), %rsi
callq 0x6cf0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x6c71
movq -0x8(%rbp), %rdi
leaq 0x41cc3(%rip), %rax     # 0x48968
movq (%rax), %rsi
callq 0x6cf0
movl 0x42edd(%rip), %esi     # 0x49b90
leaq 0x373b(%rip), %rdi      # 0xa3f5
movb $0x0, %al
callq 0x2140
movq 0x42eb8(%rip), %rdi     # 0x49b80
movq 0x42eb9(%rip), %rdx     # 0x49b88
shlq $0x4, %rdx
xorl %esi, %esi
callq 0x2150
movl 0x42eb0(%rip), %eax     # 0x49b90
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)