// File: /workspace/github_c_makefile_star2_O3/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 0x36f5
movl $0x1, %edi
movl %ebp, %esi
callq 0x36f5
movslq %r12d, %rax
imulq $0x34, %rax, %rax
leaq 0xc441(%rip), %rcx      # 0xe990
leaq (%rcx,%rax), %rbx
cmpl $0x0, 0x20(%rcx,%rax)
movl $0x0, %eax
movl $0x0, %r12d
je 0x258b
leaq 0xd14c(%rip), %rax      # 0xf6b8
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 0x25ce
leaq 0xd108(%rip), %rcx      # 0xf6b8
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 0x4f79
movl 0x20(%rbx), %edi
testl %edi, %edi
jne 0x25ec
movl 0x20(%r14), %edi
testl %edi, %edi
je 0x25f1
callq 0x7730
callq 0x72c9
xorl %eax, %eax
movl %r12d, %ecx
orl %ebp, %ecx
cmovel %eax, %r13d
testl %r13d, %r13d
je 0x26d2
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 0x69da(%rip), %xmm0     # 0x9008
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x69d2(%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 0x698f(%rip), %xmm0     # 0x9008
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x6987(%rip), %xmm0     # 0x9010
callq 0x2070
movsd %xmm0, 0x10(%rsp)
movl $0x1, %edi
movl $0x13, %esi
callq 0x4f79
leaq 0x6ac1(%rip), %rdi      # 0x916b
movl %r12d, %esi
xorl %eax, %eax
callq 0x2030
testl %r12d, %r12d
jle 0x26dd
leaq 0xcff8(%rip), %rax      # 0xf6b8
movl (%rax), %esi
leaq 0x6aac(%rip), %rdi      # 0x9175
xorl %eax, %eax
callq 0x2030
jmp 0x26eb
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
jmp 0x278f
leaq 0x6c48(%rip), %rdi      # 0x932c
xorl %eax, %eax
callq 0x2030
xorps %xmm0, %xmm0
cvtsd2ss 0x10(%rsp), %xmm0
movss %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
mulsd 0x690d(%rip), %xmm0     # 0x9018
leaq 0x6ce8(%rip), %rdi      # 0x93fa
movb $0x1, %al
callq 0x2030
movl $0x1, %edi
movl $0x14, %esi
callq 0x4f79
leaq 0x6a51(%rip), %rdi      # 0x9180
movl %ebp, %esi
xorl %eax, %eax
callq 0x2030
testl %ebp, %ebp
jle 0x2756
leaq 0xcf75(%rip), %rax      # 0xf6b8
movl 0x4(%rax), %esi
leaq 0x6a28(%rip), %rdi      # 0x9175
xorl %eax, %eax
callq 0x2030
jmp 0x2764
leaq 0x6bcf(%rip), %rdi      # 0x932c
xorl %eax, %eax
callq 0x2030
xorps %xmm0, %xmm0
cvtss2sd 0x10(%rsp), %xmm0
mulsd 0x68a3(%rip), %xmm0     # 0x9018
leaq 0x6c7e(%rip), %rdi      # 0x93fa
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