// File: jkingan[P]ladyheather/heather.cpp
// Function: alloc_adev()
void alloc_adev()
{
#ifdef ADEV_STUFF
long i;

   // allocate memory for the adev data queues

   free_adev_queues(); // adev queue memory already allocated, free it

//   adev_q_size++;  // add an extra entry for overflow protection
   i = 0L;

   pps_adev_q = (OFS_SIZE *) calloc(adev_q_size+10L, sizeof (OFS_SIZE));
   if(pps_adev_q == 0) {
      sprintf(out, "Could not allocate %lu x %lu byte PPS adev queue",
                    (unsigned long) (adev_q_size), (unsigned long) sizeof(OFS_SIZE));
      error_exit(50, out);
   }

   osc_adev_q = (OFS_SIZE *) calloc(adev_q_size+10L, sizeof (OFS_SIZE));
   if(osc_adev_q == 0) {
      sprintf(out, "Could not allocate %lu x %lu byte OSC adev queue",
                    (unsigned long) (adev_q_size), (unsigned long) sizeof(OFS_SIZE));
      error_exit(50, out);
   }

   chc_adev_q = (OFS_SIZE *) calloc(adev_q_size+10L, sizeof (OFS_SIZE));
   if(chc_adev_q == 0) {
      sprintf(out, "Could not allocate %lu x %lu byte chC adev queue",
                    (unsigned long) (adev_q_size), (unsigned long) sizeof(OFS_SIZE));
      error_exit(50, out);
   }

   chd_adev_q = (OFS_SIZE *) calloc(adev_q_size+10L, sizeof (OFS_SIZE));
   if(chd_adev_q == 0) {
      sprintf(out, "Could not allocate %lu x %lu byte chD adev queue",
                    (unsigned long) (adev_q_size), (unsigned long) sizeof(OFS_SIZE));
      error_exit(50, out);
   }

   adev_q_allocated = 1;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x13320
movq $0x0, -0x8(%rbp)
movq 0x287e5c(%rip), %rdi    # 0x29beb8
addq $0xa, %rdi
movl $0x8, %esi
callq 0x9230
movq %rax, 0x287c8f(%rip)    # 0x29bd00
cmpq $0x0, 0x287c87(%rip)    # 0x29bd00
jne 0x140ad
movq 0x287e36(%rip), %rdx    # 0x29beb8
leaq 0x387377(%rip), %rdi    # 0x39b400
leaq 0x15c0e2(%rip), %rsi    # 0x170172
movl $0x8, %ecx
movb $0x0, %al
callq 0x9060
movl $0x32, %edi
leaq 0x387358(%rip), %rsi    # 0x39b400
callq 0xc050
movq 0x287e04(%rip), %rdi    # 0x29beb8
addq $0xa, %rdi
movl $0x8, %esi
callq 0x9230
movq %rax, 0x287c87(%rip)    # 0x29bd50
cmpq $0x0, 0x287c7f(%rip)    # 0x29bd50
jne 0x14105
movq 0x287dde(%rip), %rdx    # 0x29beb8
leaq 0x38731f(%rip), %rdi    # 0x39b400
leaq 0x15c0bb(%rip), %rsi    # 0x1701a3
movl $0x8, %ecx
movb $0x0, %al
callq 0x9060
movl $0x32, %edi
leaq 0x387300(%rip), %rsi    # 0x39b400
callq 0xc050
movq 0x287dac(%rip), %rdi    # 0x29beb8
addq $0xa, %rdi
movl $0x8, %esi
callq 0x9230
movq %rax, 0x287c7f(%rip)    # 0x29bda0
cmpq $0x0, 0x287c77(%rip)    # 0x29bda0
jne 0x1415d
movq 0x287d86(%rip), %rdx    # 0x29beb8
leaq 0x3872c7(%rip), %rdi    # 0x39b400
leaq 0x15c094(%rip), %rsi    # 0x1701d4
movl $0x8, %ecx
movb $0x0, %al
callq 0x9060
movl $0x32, %edi
leaq 0x3872a8(%rip), %rsi    # 0x39b400
callq 0xc050
movq 0x287d54(%rip), %rdi    # 0x29beb8
addq $0xa, %rdi
movl $0x8, %esi
callq 0x9230
movq %rax, 0x287c77(%rip)    # 0x29bdf0
cmpq $0x0, 0x287c6f(%rip)    # 0x29bdf0
jne 0x141b5
movq 0x287d2e(%rip), %rdx    # 0x29beb8
leaq 0x38726f(%rip), %rdi    # 0x39b400
leaq 0x15c06d(%rip), %rsi    # 0x170205
movl $0x8, %ecx
movb $0x0, %al
callq 0x9060
movl $0x32, %edi
leaq 0x387250(%rip), %rsi    # 0x39b400
callq 0xc050
movl $0x1, 0x287d01(%rip)    # 0x29bec0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)