// File: /workspace/github_c_makefile_star2_O0/jrrk[P]cbzone/c_main.c
// Function: initarray
void initarray(o)
     Genericp o;
{
  Genericp s;
  Genericp g;
  Genericp pl = o;
  int i, j;

  pl->type = IS_PLAYER;                 /* player is always the first */
  pl->attr = START_LIVING;              /* object.  Same size as the */
  pl->criticalx = 45.0;                 /* other tanks.  */
  pl->criticaly = 70.0;
  for (g=o; g<o+opt->mobjects; g++) {
    g->ca = 1.0;                        /* for those objects which */
    for (j=0; j<5; j++)                 /* have rotating parts, set */
      g->dc[j].ctp = g->dc[j].cta = 1.0;  /* the cos to 1.0 */
  }

  s = o+opt->sstart;                    /* player gets msalvos, each  */
  pl->salvo = s;                        /* enemy gets one.  the salvos */
  for (i=0; i<opt->msalvos; i++) {      /* must know who their owner */
    s->salvo = pl;                      /* is for a variety of reasons */
    s->type = IS_SALVO;                 /* first the player */
    s->lntype = LN_SALVO;
    s++;
  }
  for (g=o+opt->estart; g<o+opt->lstart; g++) {
    g->salvo = s;                       /* now the enemies */
    s->salvo = g;
    s->type = IS_SALVO;
    s->lntype = LN_SALVO;
    s++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x100, (%rax)          # imm = 0x100
movq -0x20(%rbp), %rax
movl $0x3, 0x8(%rax)
movq -0x20(%rbp), %rax
movss 0x89a7(%rip), %xmm0     # 0x14838
movss %xmm0, 0x38(%rax)
movq -0x20(%rbp), %rax
movss 0x8992(%rip), %xmm0     # 0x14834
movss %xmm0, 0x3c(%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0xdaa2(%rip), %rdx      # 0x19960
movslq 0x1c(%rdx), %rdx
imulq $0x660, %rdx, %rdx      # imm = 0x660
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0xbf5f
movq -0x18(%rbp), %rax
movss 0x8197(%rip), %xmm0     # 0x14078
movss %xmm0, 0x24(%rax)
movl $0x0, -0x28(%rbp)
cmpl $0x5, -0x28(%rbp)
jge 0xbf4a
movq -0x18(%rbp), %rax
addq $0x60, %rax
movslq -0x28(%rbp), %rcx
imulq $0x130, %rcx, %rcx      # imm = 0x130
addq %rcx, %rax
movss 0x8167(%rip), %xmm0     # 0x14078
movss %xmm0, 0x118(%rax)
movq -0x18(%rbp), %rax
addq $0x60, %rax
movslq -0x28(%rbp), %rcx
imulq $0x130, %rcx, %rcx      # imm = 0x130
addq %rcx, %rax
movss 0x8141(%rip), %xmm0     # 0x14078
movss %xmm0, 0x120(%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xbeed
jmp 0xbf4c
movq -0x18(%rbp), %rax
addq $0x660, %rax            # imm = 0x660
movq %rax, -0x18(%rbp)
jmp 0xbeaf
movq -0x8(%rbp), %rax
movq 0xd9f6(%rip), %rcx      # 0x19960
movslq 0x28(%rcx), %rcx
imulq $0x660, %rcx, %rcx      # imm = 0x660
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x650(%rax)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq 0xd9c4(%rip), %rcx      # 0x19960
cmpl 0x10(%rcx), %eax
jge 0xbfde
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x650(%rax)
movq -0x10(%rbp), %rax
movl $0x80, (%rax)
movq -0x10(%rbp), %rax
movl $0x7, 0x4(%rax)
movq -0x10(%rbp), %rax
addq $0x660, %rax            # imm = 0x660
movq %rax, -0x10(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xbf92
movq -0x8(%rbp), %rax
movq 0xd977(%rip), %rcx      # 0x19960
movslq 0x20(%rcx), %rcx
imulq $0x660, %rcx, %rcx      # imm = 0x660
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0xd956(%rip), %rdx      # 0x19960
movslq 0x24(%rdx), %rdx
imulq $0x660, %rdx, %rdx      # imm = 0x660
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0xc06e
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x650(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x650(%rax)
movq -0x10(%rbp), %rax
movl $0x80, (%rax)
movq -0x10(%rbp), %rax
movl $0x7, 0x4(%rax)
movq -0x10(%rbp), %rax
addq $0x660, %rax            # imm = 0x660
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq $0x660, %rax            # imm = 0x660
movq %rax, -0x18(%rbp)
jmp 0xbffb
popq %rbp
retq