// File: /workspace/github_c_makefile_star2_O1/beejjorgensen[P]conquest/conqs3.c
// Function: pr5nt_star
void pr5nt_star(int stnum)
{
    boolean see;
    int i;
    tplanet *p;
    if ((stnum != 0) && (stnum <= nstars)) {
        if ((y_cursor + 3 + tf_stars[stnum][player] +
             tf_stars[stnum][ENEMY]) > 19) {
            clear_field();
            pause();
            point(50, 1);
        };
        if (stars[stnum].visit[player] == true) {
            see = false;
            printw("----- star %c -----            ", stnum + 'A' - 1);
            point(50, y_cursor + 1);
            if (tf_stars[stnum][player] != 0) {
                see = true;
                for (i = 1; i <= 26; i++) {
                    if (tf[player][i].dest == stnum
                        && tf[player][i].eta == 0) {
                        printw("TF%c                           ",
                               i + 'a' - 1);
                        point(55, y_cursor);
                        disp_tf(&tf[player][i]);
                        point(50, y_cursor + 1);
                    };
                };
            };
            if (!see)
                see = col_stars[stnum][player] != 0;
            if (see && (tf_stars[stnum][ENEMY] != 0)) {
                i = 1;
                while (tf[ENEMY][i].eta != 0 ||
                       (tf[ENEMY][i].dest != stnum))
                    i = i + 1;
                printw(" EN:                          ");
                point(55, y_cursor);
                disp_tf(&tf[ENEMY][i]);
                point(50, y_cursor + 1);
            };
            p = stars[stnum].first_planet;
            if (p == nil) {
                printw("  no useable planets          ");
                point(50, y_cursor + 1);
            } else {
                while (p != nil) {
                    addch(' ');
                    if (((y_cursor > 21) && (x_cursor >= 50)) ||
                        (y_cursor > 24)) {
                        pause();
                        clear_field();
                        point(50, 1);
                    };
                    printw("%d:%2d                         ", p->number,
                           p->psee_capacity);
                    point(x_cursor + 5, y_cursor);
                    x_cursor = x_cursor - 5;
                    if (p->psee_capacity == 0)
                        printw(" Decimated");
                    else if ((p->team == none) && see)
                        printw(" No colony");
                    else if (p->team == player) {
                        printw("(%2d,/%3d)", p->inhabitants, p->iu);
                        if (p->conquered)
                            printw("Con");
                        else
                            printw("   ");
                        if (p->mb != 0)
                            printw("%2dmb", p->mb);
                        else
                            printw("    ");
                        if (p->amb != 0)
                            printw("%2damb", p->amb);
                    } else if ((p->team == ENEMY) && see) {
                        printw("*EN*");
                        if (see && p->conquered) {
                            printw("Conquered");
                        } else
                            printw("   ");
                        if (p->under_attack) {
                            if (p->mb != 0)
                                printw("%2dmb", p->mb);
                            else
                                printw("    ");
                            if (p->amb != 0)
                                printw("%2damb", p->amb);
                        };
                    };
                    point(x_cursor, y_cursor + 1);

                    p = p->next;
                };
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testl %edi, %edi
sete %al
cmpl $0x16, %edi
setge %cl
orb %al, %cl
jne 0x7abe
movl %edi, %ebx
leaq 0x810a(%rip), %rbp      # 0xf8c4
movl (%rbp), %eax
movslq %edi, %r12
leaq 0x6469(%rip), %r14      # 0xdc30
addl 0x4(%r14,%r12,8), %eax
movl (%r14,%r12,8), %ecx
addl %ecx, %eax
addl $0x3, %eax
cmpl $0x14, %eax
jl 0x77f3
callq 0x731e
callq 0x763e
movl $0x32, %edi
movl $0x1, %esi
callq 0x4f69
leaq (%r12,%r12,2), %r15
leaq 0x7ca2(%rip), %rax      # 0xf4a0
cmpl $0x1, 0x14(%rax,%r15,8)
jne 0x7abe
leal 0x40(%rbx), %esi
leaq 0x261c(%rip), %rdi      # 0x9e30
xorl %eax, %eax
callq 0x2030
movl (%rbp), %esi
incl %esi
movl $0x32, %edi
callq 0x4f69
movl 0x4(%r14,%r12,8), %eax
testl %eax, %eax
je 0x78ab
movl %eax, 0x4(%rsp)
movl $0x5b0, %r14d           # imm = 0x5B0
addq 0x5774(%rip), %r14      # 0xcfb8
movq $-0x1a, %r13
cmpl %ebx, 0x20(%r14)
jne 0x7891
cmpl $0x0, 0x24(%r14)
jne 0x7891
leal 0x1b(%r13), %esi
orl $0x60, %esi
leaq 0x25ea(%rip), %rdi      # 0x9e50
xorl %eax, %eax
callq 0x2030
movl (%rbp), %esi
movl $0x37, %edi
callq 0x4f69
movq %r14, %rdi
callq 0x27a9
movl (%rbp), %esi
incl %esi
movl $0x32, %edi
callq 0x4f69
addq $0x34, %r14
incq %r13
jne 0x784b
movb $0x1, %r13b
cmpl $0x0, 0x4(%rsp)
leaq 0x6387(%rip), %r14      # 0xdc30
jne 0x78bc
leaq 0x642e(%rip), %rax      # 0xdce0
cmpl $0x0, 0x4(%rax,%r12,8)
setne %r13b
leaq 0x7bdd(%rip), %rax      # 0xf4a0
leaq (%rax,%r15,8), %r15
testb %r13b, %r13b
je 0x791d
cmpl $0x0, (%r14,%r12,8)
je 0x791d
leaq 0x70c6(%rip), %r14      # 0xe9a0
addq $0x34, %r14
cmpl $0x0, 0x24(%r14)
jne 0x78da
cmpl %ebx, 0x20(%r14)
jne 0x78da
leaq 0x257e(%rip), %rdi      # 0x9e70
xorl %eax, %eax
callq 0x2030
movl (%rbp), %esi
movl $0x37, %edi
callq 0x4f69
movq %r14, %rdi
callq 0x27a9
movl (%rbp), %esi
incl %esi
movl $0x32, %edi
callq 0x4f69
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x7acd
movq 0x56b7(%rip), %r15      # 0xcfe8
leaq 0x7f88(%rip), %r14      # 0xf8c0
leaq 0x1b8a(%rip), %rbx      # 0x94c9
xorb $0x1, %r13b
movq (%r15), %rdi
movl $0x20, %esi
callq 0x20a0
movl (%rbp), %edx
cmpl $0x16, %edx
setge %al
cmpl $0x32, (%r14)
setge %cl
cmpl $0x18, %edx
jg 0x7969
andb %cl, %al
je 0x7982
callq 0x763e
callq 0x731e
movl $0x32, %edi
movl $0x1, %esi
callq 0x4f69
movl (%r12), %esi
movl 0x8(%r12), %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2030
movl (%r14), %edi
addl $0x5, %edi
movl (%rbp), %esi
callq 0x4f69
addl $-0x5, (%r14)
cmpl $0x0, 0x8(%r12)
je 0x79c8
movl 0xc(%r12), %eax
cmpl $0x2, %eax
setne %cl
orb %r13b, %cl
jne 0x79f6
leaq 0x1b2e(%rip), %rdi      # 0x94f4
jmp 0x79cf
leaq 0x1b1a(%rip), %rdi      # 0x94e9
xorl %eax, %eax
callq 0x2030
movl (%r14), %edi
movl (%rbp), %esi
incl %esi
callq 0x4f69
movq 0x38(%r12), %r12
testq %r12, %r12
jne 0x7943
jmp 0x7abe
cmpl $0x1, %eax
jne 0x7a34
movl 0x10(%r12), %esi
movl 0x14(%r12), %edx
leaq 0x1af3(%rip), %rdi      # 0x94ff
xorl %eax, %eax
callq 0x2030
cmpl $0x0, 0x20(%r12)
leaq 0x1aea(%rip), %rdi      # 0x950a
leaq 0x1bae(%rip), %rax      # 0x95d5
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x2030
jmp 0x7a77
testl %eax, %eax
setne %al
orb %r13b, %al
jne 0x79d6
leaq 0x1ad6(%rip), %rdi      # 0x951b
xorl %eax, %eax
callq 0x2030
cmpl $0x0, 0x20(%r12)
leaq 0x1ac7(%rip), %rdi      # 0x9520
leaq 0x1b75(%rip), %rax      # 0x95d5
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x2030
cmpl $0x0, 0x24(%r12)
je 0x79d6
movl 0x18(%r12), %esi
testl %esi, %esi
je 0x7a90
leaq 0x1a87(%rip), %rdi      # 0x950e
xorl %eax, %eax
callq 0x2030
jmp 0x7a9e
leaq 0x1b3d(%rip), %rdi      # 0x95d4
xorl %eax, %eax
callq 0x2030
movl 0x1c(%r12), %esi
testl %esi, %esi
je 0x79d6
leaq 0x1a62(%rip), %rdi      # 0x9514
xorl %eax, %eax
callq 0x2030
jmp 0x79d6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x23bb(%rip), %rdi      # 0x9e8f
xorl %eax, %eax
callq 0x2030
movl (%rbp), %esi
incl %esi
movl $0x32, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4f69