// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x4(%rbp), %esi
xorl %edi, %edi
callq 0x4280
movl -0x8(%rbp), %esi
movl $0x1, %edi
callq 0x4280
movl $0x1, -0x2c(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x1123f(%rip), %rax     # 0x139a0
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x20(%rax)
je 0x27ad
leaq 0x11f53(%rip), %rax     # 0x146c8
movl (%rax), %eax
movslq -0x4(%rbp), %rdx
leaq 0x1121e(%rip), %rcx     # 0x139a0
imulq $0x34, %rdx, %rdx
addq %rdx, %rcx
imull $0x7, 0x18(%rcx), %ecx
movslq -0x4(%rbp), %rsi
leaq 0x11208(%rip), %rdx     # 0x139a0
imulq $0x34, %rsi, %rsi
addq %rsi, %rdx
imull $0x28, 0x1c(%rdx), %edx
addl %edx, %ecx
imull %ecx, %eax
movl %eax, -0x30(%rbp)
jmp 0x27b4
movl $0x0, -0x2c(%rbp)
movslq -0x8(%rbp), %rcx
leaq 0x111e1(%rip), %rax     # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x20(%rax)
je 0x2820
leaq 0x11eef(%rip), %rax     # 0x146c8
movl 0x4(%rax), %eax
movslq -0x8(%rbp), %rdx
leaq 0x111b9(%rip), %rcx     # 0x139a0
addq $0x57c, %rcx            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rcx
imull $0x7, 0x18(%rcx), %ecx
movslq -0x8(%rbp), %rsi
leaq 0x1119c(%rip), %rdx     # 0x139a0
addq $0x57c, %rdx            # imm = 0x57C
imulq $0x34, %rsi, %rsi
addq %rsi, %rdx
imull $0x28, 0x1c(%rdx), %edx
addl %edx, %ecx
imull %ecx, %eax
movl %eax, -0x34(%rbp)
jmp 0x2827
movl $0x0, -0x2c(%rbp)
movl $0x32, %edi
movl $0x1, %esi
callq 0x69f0
movslq -0x4(%rbp), %rcx
leaq 0x1115f(%rip), %rax     # 0x139a0
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x20(%rax)
je 0x286a
movslq -0x4(%rbp), %rcx
leaq 0x11147(%rip), %rax     # 0x139a0
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %edi
callq 0xaeb0
jmp 0x28aa
movslq -0x8(%rbp), %rcx
leaq 0x1112b(%rip), %rax     # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x20(%rax)
je 0x28a8
movslq -0x8(%rbp), %rcx
leaq 0x1110d(%rip), %rax     # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %edi
callq 0xaeb0
jmp 0x28aa
callq 0xa6a0
cmpl $0x0, -0x30(%rbp)
jne 0x28c2
cmpl $0x0, -0x34(%rbp)
jne 0x28c2
movl $0x0, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x2ad7
cvtsi2ssl -0x34(%rbp), %xmm0
movl -0x30(%rbp), %eax
movslq -0x4(%rbp), %rdx
leaq 0x110c1(%rip), %rcx     # 0x139a0
imulq $0x34, %rdx, %rdx
addq %rdx, %rcx
movl 0x14(%rcx), %ecx
shll $0x0, %ecx
addl %ecx, %eax
movslq -0x4(%rbp), %rdx
leaq 0x110a7(%rip), %rcx     # 0x139a0
imulq $0x34, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
shll %ecx
addl %ecx, %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xb6eb(%rip), %xmm1     # 0xe010
minsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
movsd 0xb6ce(%rip), %xmm0     # 0xe008
callq 0x2090
movss -0x24(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
callq 0x2060
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
cvtsi2ssl -0x30(%rbp), %xmm0
movl -0x34(%rbp), %eax
movslq -0x8(%rbp), %rdx
leaq 0x11033(%rip), %rcx     # 0x139a0
addq $0x57c, %rcx            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rcx
movl 0x14(%rcx), %ecx
shll $0x0, %ecx
addl %ecx, %eax
movslq -0x8(%rbp), %rdx
leaq 0x11012(%rip), %rcx     # 0x139a0
addq $0x57c, %rcx            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rcx
movl 0x10(%rcx), %ecx
shll %ecx
addl %ecx, %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x28(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xb64f(%rip), %xmm1     # 0xe010
minsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x28(%rbp)
movsd 0xb632(%rip), %xmm0     # 0xe008
callq 0x2090
movss -0x28(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
callq 0x2060
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x28(%rbp)
movl $0x1, %edi
movl $0x13, %esi
callq 0x69f0
movl -0x30(%rbp), %esi
leaq 0xb710(%rip), %rdi      # 0xe11f
movb $0x0, %al
callq 0x2030
cmpl $0x0, -0x30(%rbp)
jle 0x2a35
leaq 0x11ca5(%rip), %rax     # 0x146c8
movl (%rax), %esi
leaq 0xb6fd(%rip), %rdi      # 0xe129
movb $0x0, %al
callq 0x2030
jmp 0x2a43
leaq 0xb9a8(%rip), %rdi      # 0xe3e4
movb $0x0, %al
callq 0x2030
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xb5c4(%rip), %xmm1     # 0xe018
mulsd %xmm1, %xmm0
leaq 0xba53(%rip), %rdi      # 0xe4b2
movb $0x1, %al
callq 0x2030
movl $0x1, %edi
movl $0x14, %esi
callq 0x69f0
movl -0x34(%rbp), %esi
leaq 0xb6b5(%rip), %rdi      # 0xe134
movb $0x0, %al
callq 0x2030
cmpl $0x0, -0x34(%rbp)
jle 0x2aa6
leaq 0x11c35(%rip), %rax     # 0x146c8
movl 0x4(%rax), %esi
leaq 0xb68c(%rip), %rdi      # 0xe129
movb $0x0, %al
callq 0x2030
jmp 0x2ab4
leaq 0xb937(%rip), %rdi      # 0xe3e4
movb $0x0, %al
callq 0x2030
movss -0x28(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0xb553(%rip), %xmm1     # 0xe018
mulsd %xmm1, %xmm0
leaq 0xb9e2(%rip), %rdi      # 0xe4b2
movb $0x1, %al
callq 0x2030
movss -0x24(%rbp), %xmm0
movq -0x10(%rbp), %rax
movss %xmm0, (%rax)
movss -0x28(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, (%rax)
movl -0x2c(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
addq $0x40, %rsp
popq %rbp
retq