// File: /workspace/github_c_makefile_star2_O0/beejjorgensen[P]conquest/conqmc.c
// Function: send4transports
void send4transports(float slist[nstars + 1], struct sttf *task)
{
    int new_tf, to_land, sec_star, sec_score, best_star, top_score,
        score, starnum;
    int xstar;
    struct stplanet *pplan, *best_plan;
    int trash1, trash2;

    if (task->t > 0) {
        best_star = 0;
        sec_star = 0;
        sec_score = -11000;
        top_score = -10000;
        best_plan = nil;
        for (starnum = 1; starnum <= nstars; starnum++) {
            if ((slist[starnum] > 0) || (starnum == task->dest)) {
                pplan = stars[starnum].first_planet;
                while (pplan != nil) {
                    score = eval_t_col(pplan, slist[starnum]);
                    xstar = starnum;
                    if (score > top_score) {
                        swap(&best_star, &xstar);
                        swap(&top_score, &score);
                        best_plan = pplan;
                    };
                    if (score > sec_score) {
                        sec_score = score;
                        sec_star = xstar;
                    };
                    pplan = pplan->next;
                };
            };
        };
        if (best_star == task->dest) {  /*land */
            if ((tf_stars[best_star][player] == 0)
                && (best_plan->team != player)
                ) {
                trash1 = task->t;
                trash2 =
                    (best_plan->capacity - best_plan->inhabitants) / 3;
                to_land = MIN(trash1, trash2);
                if ((to_land > 0)) {
                    if (best_plan->inhabitants == 0) {
                        best_plan->team = ENEMY;
                        best_plan->esee_team = ENEMY;
                        col_stars[best_star][ENEMY] =
                            col_stars[best_star][ENEMY] + 1;
                    };
                    best_plan->inhabitants =
                        best_plan->inhabitants + to_land;
                    best_plan->iu = best_plan->iu + to_land;
                    task->t = task->t - to_land;
                    send4transports(slist, task);
                };
            };
        } else {                /*move */
            if ((task->t >= 10) && (sec_star > 0)) {
                get_tf(ENEMY, &new_tf, task->dest);
                tf[ENEMY][new_tf].t = task->t / 2;
                task->t = task->t - tf[ENEMY][new_tf].t;
                if ((task->c > 0) && (!underdefended(task->dest))) {
                    tf[ENEMY][new_tf].c = 1;
                    task->c = task->c - 1;
                };
                send2t_tf(&tf[ENEMY][new_tf], slist, best_star);
                best_star = sec_star;
            };
            get_tf(ENEMY, &new_tf, task->dest);
            tf[ENEMY][new_tf].t = task->t;
            task->t = 0;
            if ((task->c > 0) && (!underdefended(task->dest))) {
                tf[ENEMY][new_tf].c = 1;
                task->c = task->c - 1;
            };
            send2t_tf(&tf[ENEMY][new_tf], slist, best_star);
        };
    };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jle 0x76af
movl $0x0, -0x24(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0xffffd508, -0x20(%rbp) # imm = 0xFFFFD508
movl $0xffffd8f0, -0x28(%rbp) # imm = 0xFFFFD8F0
movq $0x0, -0x48(%rbp)
movl $0x1, -0x30(%rbp)
cmpl $0x15, -0x30(%rbp)
jg 0x7436
movq -0x8(%rbp), %rax
movslq -0x30(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
ja 0x7398
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x7426
movslq -0x30(%rbp), %rcx
leaq 0xd0fd(%rip), %rax      # 0x144a0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x7424
movq -0x40(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq -0x30(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
callq 0x6ec0
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jle 0x7402
leaq -0x24(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0xb3f0
leaq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0xb3f0
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x7416
movl -0x2c(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x40(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x73b2
jmp 0x7426
jmp 0x7428
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x7369
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0x7535
movslq -0x24(%rbp), %rcx
leaq 0xb7df(%rip), %rax      # 0x12c30
cmpl $0x0, 0x4(%rax,%rcx,8)
jne 0x7530
movq -0x48(%rbp), %rax
cmpl $0x1, 0xc(%rax)
je 0x7530
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movl 0x4(%rax), %eax
movq -0x48(%rbp), %rcx
subl 0x10(%rcx), %eax
movl $0x3, %ecx
cltd
idivl %ecx
movl %eax, -0x50(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x50(%rbp), %eax
jge 0x749d
movl -0x4c(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x74a3
movl -0x50(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jle 0x752e
movq -0x48(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x74ee
movq -0x48(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x48(%rbp), %rax
movl $0x0, 0x28(%rax)
movslq -0x24(%rbp), %rcx
leaq 0xb806(%rip), %rax      # 0x12ce0
movl (%rax,%rcx,8), %edx
addl $0x1, %edx
movslq -0x24(%rbp), %rcx
leaq 0xb7f5(%rip), %rax      # 0x12ce0
movl %edx, (%rax,%rcx,8)
movq -0x48(%rbp), %rax
movl 0x10(%rax), %ecx
addl -0x18(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x48(%rbp), %rax
movl 0x14(%rax), %ecx
addl -0x18(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
subl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7320
jmp 0x7530
jmp 0x76ad
movq -0x10(%rbp), %rax
cmpl $0xa, 0x14(%rax)
jl 0x7611
cmpl $0x0, -0x1c(%rbp)
jle 0x7611
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
xorl %edi, %edi
leaq -0x14(%rbp), %rsi
callq 0x2e80
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movslq -0x14(%rbp), %rdx
leaq 0xc425(%rip), %rax      # 0x139a0
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
movslq -0x14(%rbp), %rdx
leaq 0xc409(%rip), %rax      # 0x139a0
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
subl 0x14(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jle 0x75ed
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edi
callq 0x79b0
cmpl $0x0, %eax
jne 0x75ed
movslq -0x14(%rbp), %rcx
leaq 0xc3d2(%rip), %rax      # 0x139a0
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x18(%rax)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movslq -0x14(%rbp), %rax
leaq 0xc3a8(%rip), %rdi      # 0x139a0
imulq $0x34, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x7a70
movl -0x1c(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
xorl %edi, %edi
leaq -0x14(%rbp), %rsi
callq 0x2e80
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
movslq -0x14(%rbp), %rdx
leaq 0xc36b(%rip), %rax      # 0x139a0
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x14(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jle 0x768f
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edi
callq 0x79b0
cmpl $0x0, %eax
jne 0x768f
movslq -0x14(%rbp), %rcx
leaq 0xc330(%rip), %rax      # 0x139a0
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x18(%rax)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
subl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x18(%rax)
movslq -0x14(%rbp), %rax
leaq 0xc306(%rip), %rdi      # 0x139a0
imulq $0x34, %rax, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x7a70
jmp 0x76af
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)