// File: /workspace/github_c_makefile_star2_O2/beejjorgensen[P]conquest/conq1.c
// Function: display_forces
void display_forces(int ennum, int plnum, float *En0dds, float *Pl0dds,
                    boolean *Battl9)
{
    float enodds = 0, plodds = 0;
    boolean battle;
    int en_forces = 0, pl_forces = 0;
    zero_tf(ENEMY, ennum);
    zero_tf(player, plnum);
    battle = true;
    if (tf[ENEMY][ennum].dest != 0)
        en_forces = weapons[ENEMY] * ((tf[ENEMY][ennum].c * c_guns)
                                      + (tf[ENEMY][ennum].b * b_guns));
    else
        battle = false;
    if (tf[player][plnum].dest != 0)
        pl_forces = weapons[player] * ((tf[player][plnum].c * c_guns)
                                       + (tf[player][plnum].b * b_guns));
    else
        battle = false;
    point(50, 1);
    if (tf[ENEMY][ennum].dest != 0)
        pr5nt_star(tf[ENEMY][ennum].dest);
    else if (tf[player][plnum].dest != 0)
        pr5nt_star(tf[player][plnum].dest);
    clear_field();
    if ((en_forces == 0) && (pl_forces == 0))
        battle = false;
    if (battle) {
        enodds = ((float) pl_forces) / (en_forces
                                        + tf[ENEMY][ennum].t * t_def
                                        + tf[ENEMY][ennum].s * s_def);
        enodds = fmin(14.0, enodds);
        enodds = exp((log(0.8)) * enodds);
        plodds = ((float) en_forces) / (pl_forces
                                        + tf[player][plnum].t * t_def
                                        + tf[player][plnum].s * s_def);
        plodds = fmin(14.0, plodds);
        plodds = exp((log(0.8)) * plodds);
        point(1, 19);
        printw("enemy %5d", en_forces);
        if (en_forces > 0)
            printw("(weap %2d)", weapons[ENEMY]);
        else
            printw("         ");
        printw("sur: %4.0f", enodds * 100.0);
        point(1, 20);
        printw("player %5d", pl_forces);
        if (pl_forces > 0)
            printw("(weap %2d)", weapons[player]);
        else
            printw("         ");
        printw("sur: %4.0f", plodds * 100.0);
    };
    *En0dds = enodds;
    *Pl0dds = plodds;
    *Battl9 = battle;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, %r15
movl %esi, %ebp
movl %edi, %r12d
xorl %ebx, %ebx
xorl %edi, %edi
movl %r12d, %esi
callq 0x35b4
pushq $0x1
popq %r13
movl %r13d, %edi
movl %ebp, %esi
callq 0x35b4
movslq %r12d, %rax
imulq $0x34, %rax, %rax
leaq 0xd475(%rip), %rcx      # 0xf990
leaq (%rcx,%rax), %r14
cmpl $0x0, 0x20(%rcx,%rax)
movl $0x0, %eax
movl $0x0, %r12d
je 0x254c
leaq 0xe180(%rip), %rax      # 0x106b8
imull $0x7, 0x18(%r14), %edx
imull $0x28, 0x1c(%r14), %r12d
addl %edx, %r12d
imull (%rax), %r12d
movl %r13d, %eax
movslq %ebp, %rdx
imulq $0x34, %rdx, %rdx
leaq (%rcx,%rdx), %r13
addq $0x57c, %r13            # imm = 0x57C
cmpl $0x0, 0x20(%r13)
movl $0x0, %ebp
je 0x2583
leaq 0xe147(%rip), %rcx      # 0x106b8
imull $0x7, 0x18(%r13), %edx
imull $0x28, 0x1c(%r13), %ebp
addl %edx, %ebp
imull 0x4(%rcx), %ebp
movl %eax, %ebx
pushq $0x32
popq %rdi
pushq $0x1
popq %rsi
callq 0x4dbd
movl 0x20(%r14), %edi
testl %edi, %edi
jne 0x259e
movl 0x20(%r13), %edi
testl %edi, %edi
je 0x25a3
callq 0x72df
callq 0x6eef
xorl %eax, %eax
movl %r12d, %ecx
orl %ebp, %ecx
cmovel %eax, %ebx
testl %ebx, %ebx
je 0x267a
cvtsi2ss %ebp, %xmm0
movl 0x14(%r14), %eax
addl %r12d, %eax
movl 0x10(%r14), %ecx
leal (%rax,%rcx,2), %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
minsd 0x6a28(%rip), %xmm0     # 0x9008
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x6a20(%rip), %xmm0     # 0x9010
callq 0x2060
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
cvtsi2ss %r12d, %xmm0
movl 0x14(%r13), %eax
addl %ebp, %eax
movl 0x10(%r13), %ecx
leal (%rax,%rcx,2), %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
minsd 0x69e3(%rip), %xmm0     # 0x9008
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x69db(%rip), %xmm0     # 0x9010
callq 0x2060
movsd %xmm0, 0x10(%rsp)
pushq $0x1
popq %rdi
pushq $0x13
popq %rsi
callq 0x4dbd
leaq 0x6ad1(%rip), %rdi      # 0x9123
movl %r12d, %esi
xorl %eax, %eax
callq 0x2030
testl %r12d, %r12d
jle 0x2685
leaq 0xe050(%rip), %rax      # 0x106b8
movl (%rax), %esi
leaq 0x6abc(%rip), %rdi      # 0x912d
xorl %eax, %eax
callq 0x2030
jmp 0x2693
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
jmp 0x272a
leaq 0x6c58(%rip), %rdi      # 0x92e4
xorl %eax, %eax
callq 0x2030
cvtsd2ss 0x10(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
cvtss2sd 0xc(%rsp), %xmm0
mulsd 0x696b(%rip), %xmm0     # 0x9018
leaq 0x6cfe(%rip), %rdi      # 0x93b2
movb $0x1, %al
callq 0x2030
pushq $0x1
popq %rdi
pushq $0x14
popq %rsi
callq 0x4dbd
leaq 0x6a6b(%rip), %rdi      # 0x9138
movl %ebp, %esi
xorl %eax, %eax
callq 0x2030
testl %ebp, %ebp
jle 0x26f4
leaq 0xdfd7(%rip), %rax      # 0x106b8
movl 0x4(%rax), %esi
leaq 0x6a42(%rip), %rdi      # 0x912d
xorl %eax, %eax
callq 0x2030
jmp 0x2702
leaq 0x6be9(%rip), %rdi      # 0x92e4
xorl %eax, %eax
callq 0x2030
cvtss2sd 0x10(%rsp), %xmm0
mulsd 0x6908(%rip), %xmm0     # 0x9018
leaq 0x6c9b(%rip), %rdi      # 0x93b2
movb $0x1, %al
callq 0x2030
movss 0x10(%rsp), %xmm1
movss 0xc(%rsp), %xmm0
movss %xmm0, (%r15)
movq 0x18(%rsp), %rax
movss %xmm1, (%rax)
movq 0x20(%rsp), %rax
movl %ebx, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq