// File: /workspace/github_c_makefile_star2_O1/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 %r13d, %r13d
xorl %edi, %edi
movl %r12d, %esi
callq 0x3695
movl $0x1, %edi
movl %ebp, %esi
callq 0x3695
movslq %r12d, %rax
imulq $0x34, %rax, %rax
leaq 0xc45c(%rip), %rcx      # 0xe9a0
leaq (%rcx,%rax), %rbx
cmpl $0x0, 0x20(%rcx,%rax)
movl $0x0, %eax
movl $0x0, %r12d
je 0x2580
leaq 0xd167(%rip), %rax      # 0xf6c8
movl 0x18(%rbx), %edx
movl 0x1c(%rbx), %esi
leal (,%rdx,8), %edi
subl %edx, %edi
leal (%rsi,%rsi,4), %edx
leal (%rdi,%rdx,8), %r12d
imull (%rax), %r12d
movl $0x1, %eax
movslq %ebp, %rdx
imulq $0x34, %rdx, %rdx
leaq (%rcx,%rdx), %r14
addq $0x57c, %r14            # imm = 0x57C
cmpl $0x0, 0x20(%r14)
movl $0x0, %ebp
je 0x25c3
leaq 0xd123(%rip), %rcx      # 0xf6c8
movl 0x18(%r14), %edx
movl 0x1c(%r14), %esi
leal (,%rdx,8), %edi
subl %edx, %edi
leal (%rsi,%rsi,4), %edx
leal (%rdi,%rdx,8), %ebp
imull 0x4(%rcx), %ebp
movl %eax, %r13d
movl $0x32, %edi
movl $0x1, %esi
callq 0x4f69
movl 0x20(%rbx), %edi
testl %edi, %edi
jne 0x25e1
movl 0x20(%r14), %edi
testl %edi, %edi
je 0x25e6
callq 0x7793
callq 0x731e
xorl %eax, %eax
movl %r12d, %ecx
orl %ebp, %ecx
cmovel %eax, %r13d
testl %r13d, %r13d
je 0x26c7
cvtsi2ss %ebp, %xmm0
movl 0x14(%rbx), %eax
addl %r12d, %eax
movl 0x10(%rbx), %ecx
leal (%rax,%rcx,2), %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
minsd 0x69e5(%rip), %xmm0     # 0x9008
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x69dd(%rip), %xmm0     # 0x9010
callq 0x2070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
xorps %xmm0, %xmm0
cvtsi2ss %r12d, %xmm0
movl 0x14(%r14), %eax
addl %ebp, %eax
movl 0x10(%r14), %ecx
leal (%rax,%rcx,2), %eax
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
minsd 0x699a(%rip), %xmm0     # 0x9008
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x6992(%rip), %xmm0     # 0x9010
callq 0x2070
movsd %xmm0, 0x10(%rsp)
movl $0x1, %edi
movl $0x13, %esi
callq 0x4f69
leaq 0x6a84(%rip), %rdi      # 0x9123
movl %r12d, %esi
xorl %eax, %eax
callq 0x2030
testl %r12d, %r12d
jle 0x26d2
leaq 0xd013(%rip), %rax      # 0xf6c8
movl (%rax), %esi
leaq 0x6a6f(%rip), %rdi      # 0x912d
xorl %eax, %eax
callq 0x2030
jmp 0x26e0
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
jmp 0x2784
leaq 0x6c0b(%rip), %rdi      # 0x92e4
xorl %eax, %eax
callq 0x2030
xorps %xmm0, %xmm0
cvtsd2ss 0x10(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
mulsd 0x6918(%rip), %xmm0     # 0x9018
leaq 0x6cab(%rip), %rdi      # 0x93b2
movb $0x1, %al
callq 0x2030
movl $0x1, %edi
movl $0x14, %esi
callq 0x4f69
leaq 0x6a14(%rip), %rdi      # 0x9138
movl %ebp, %esi
xorl %eax, %eax
callq 0x2030
testl %ebp, %ebp
jle 0x274b
leaq 0xcf90(%rip), %rax      # 0xf6c8
movl 0x4(%rax), %esi
leaq 0x69eb(%rip), %rdi      # 0x912d
xorl %eax, %eax
callq 0x2030
jmp 0x2759
leaq 0x6b92(%rip), %rdi      # 0x92e4
xorl %eax, %eax
callq 0x2030
xorps %xmm0, %xmm0
cvtss2sd 0x10(%rsp), %xmm0
mulsd 0x68ae(%rip), %xmm0     # 0x9018
leaq 0x6c41(%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 %r13d, (%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq