// File: /workspace/github_c_makefile_star2_O1/beejjorgensen[P]conquest/conqmc.c
// Function: send_scouts
void send_scouts(float slist[nstars + 1], struct sttf *task)
{
    int dest, new_tf, j, doind;
    int doable[nstars + 1];
    if (task->s > 0) {
        doind = 0;
        for (j = 1; j <= nstars; j++) {
            if ((!stars[j].visit[ENEMY]) && (slist[j] > 0)) {
                doind = doind + 1;
                doable[doind] = j;
            };
        };
        while ((doind > 0) && (task->s > 0)) {
            get_tf(ENEMY, &new_tf, task->dest);
            tf[ENEMY][new_tf].s = 1;
            dest = rnd(doind);
            tf[ENEMY][new_tf].dest = doable[dest];
            tf[ENEMY][new_tf].eta =
                (int) ((slist[doable[dest]] - 0.01) / vel[ENEMY])
                + 1;
            depart(task->dest);
            doable[dest] = doable[doind];
            doind = doind - 1;
            task->s = task->s - 1;
        };
        while (task->s > 0) {
            do {
                dest = rnd(nstars);
            }
            while (slist[dest] <= 0);
            get_tf(ENEMY, &new_tf, task->dest);
            tf[ENEMY][new_tf].s = 1;
            tf[ENEMY][new_tf].dest = dest;
            tf[ENEMY][new_tf].eta =
                (int) ((slist[dest] - 0.01) / vel[ENEMY]) + 1;
            depart(task->dest);
            task->s = task->s - 1;
        };
    };
}

// Assembly:
cmpl $0x0, 0x10(%rsi)
jle 0x54fd
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xa16e(%rip), %rcx      # 0xf4a0
addq $0x28, %rcx
xorl %eax, %eax
movl $0x1, %edx
xorps %xmm0, %xmm0
cmpl $0x0, (%rcx)
jne 0x5359
movss (%r14,%rdx,4), %xmm1
ucomiss %xmm0, %xmm1
jbe 0x5359
movslq %eax, %rsi
incl %eax
movl %edx, 0x14(%rsp,%rsi,4)
incq %rdx
addq $0x18, %rcx
cmpq $0x16, %rdx
jne 0x5340
testl %eax, %eax
jle 0x5436
movl %eax, %r15d
leaq 0x9628(%rip), %r13      # 0xe9a0
leaq 0x88b1(%rip), %r12      # 0xdc30
leaq 0x895a(%rip), %rbp      # 0xdce0
cmpl $0x0, 0x10(%rbx)
jle 0x5436
movl 0x20(%rbx), %edx
xorl %edi, %edi
leaq 0xc(%rsp), %rsi
callq 0x2a18
movslq 0xc(%rsp), %rax
imulq $0x34, %rax, %rax
movl $0x1, 0x10(%r13,%rax)
movl %r15d, %edi
callq 0x4fc5
cltq
movslq 0x10(%rsp,%rax,4), %rcx
movslq 0xc(%rsp), %rdx
imulq $0x34, %rdx, %rdx
movl %ecx, 0x20(%r13,%rdx)
xorps %xmm0, %xmm0
cvtss2sd (%r14,%rcx,4), %xmm0
addsd 0x3e79(%rip), %xmm0     # 0x9258
leaq 0xa2d2(%rip), %rcx      # 0xf6b8
xorps %xmm1, %xmm1
cvtsi2sdl (%rcx), %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
incl %ecx
movl %ecx, 0x24(%r13,%rdx)
movslq 0x20(%rbx), %rcx
movl 0x4(%rbp,%rcx,8), %edx
addl 0x4(%r12,%rcx,8), %edx
jle 0x5419
leaq 0xa3ee(%rip), %rdx      # 0xf800
movl $0x1, (%rdx,%rcx,4)
movl 0x10(%rsp,%r15,4), %ecx
movl %ecx, 0x10(%rsp,%rax,4)
decl 0x10(%rbx)
leaq -0x1(%r15), %rax
cmpq $0x1, %r15
movq %rax, %r15
jg 0x5386
cmpl $0x0, 0x10(%rbx)
jle 0x54ef
leaq 0x9559(%rip), %r12      # 0xe9a0
leaq 0x87e2(%rip), %rbp      # 0xdc30
leaq 0x888b(%rip), %r15      # 0xdce0
movl $0x15, %edi
callq 0x4fc5
movslq %eax, %r13
xorps %xmm0, %xmm0
ucomiss (%r14,%r13,4), %xmm0
jae 0x5455
movl 0x20(%rbx), %edx
xorl %edi, %edi
leaq 0xc(%rsp), %rsi
callq 0x2a18
movslq 0xc(%rsp), %rax
imulq $0x34, %rax, %rax
movl $0x1, 0x10(%r12,%rax)
movl %r13d, 0x20(%r12,%rax)
xorps %xmm0, %xmm0
cvtss2sd (%r14,%r13,4), %xmm0
addsd 0x3db5(%rip), %xmm0     # 0x9258
leaq 0xa20e(%rip), %rcx      # 0xf6b8
xorps %xmm1, %xmm1
cvtsi2sdl (%rcx), %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
incl %ecx
movl %ecx, 0x24(%r12,%rax)
movslq 0x20(%rbx), %rax
movl 0x4(%r15,%rax,8), %ecx
addl 0x4(%rbp,%rax,8), %ecx
jle 0x54dd
leaq 0xa32a(%rip), %rcx      # 0xf800
movl $0x1, (%rcx,%rax,4)
movl 0x10(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rbx)
cmpl $0x1, %eax
jg 0x5455
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq