// File: /workspace/github_c_makefile_star2_O3/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 0x7a52
movl %edi, %ebx
leaq 0x815d(%rip), %rbp      # 0xf8b4
movl (%rbp), %eax
movslq %edi, %r12
leaq 0x64bc(%rip), %r14      # 0xdc20
addl 0x4(%r14,%r12,8), %eax
movl (%r14,%r12,8), %ecx
addl %ecx, %eax
addl $0x3, %eax
cmpl $0x14, %eax
jl 0x7790
callq 0x72c9
callq 0x75db
movl $0x32, %edi
movl $0x1, %esi
callq 0x4f79
leaq (%r12,%r12,2), %rax
leaq 0x7cf5(%rip), %rcx      # 0xf490
cmpl $0x1, 0x14(%rcx,%rax,8)
jne 0x7a52
leaq (%rcx,%rax,8), %rax
movq %rax, (%rsp)
leal 0x40(%rbx), %esi
leaq 0x26c8(%rip), %rdi      # 0x9e80
xorl %eax, %eax
callq 0x2030
movl (%rbp), %esi
incl %esi
movl $0x32, %edi
callq 0x4f79
cmpl $0x0, 0x4(%r14,%r12,8)
je 0x783e
movl $0x5b0, %r14d           # imm = 0x5B0
addq 0x57cd(%rip), %r14      # 0xcfb0
movq $-0x1a, %r13
leaq 0x26af(%rip), %r15      # 0x9ea0
cmpl %ebx, 0x20(%r14)
jne 0x7833
cmpl $0x0, 0x24(%r14)
jne 0x7833
leal 0x1b(%r13), %esi
orl $0x60, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2030
movl (%rbp), %esi
movl $0x37, %edi
callq 0x4f79
movq %r14, %rdi
callq 0x27b4
movl (%rbp), %esi
incl %esi
movl $0x32, %edi
callq 0x4f79
addq $0x34, %r14
incq %r13
jne 0x77f1
jmp 0x784d
leaq 0x648b(%rip), %rax      # 0xdcd0
cmpl $0x0, 0x4(%rax,%r12,8)
je 0x78aa
movb $0x1, %r13b
leaq 0x63c9(%rip), %rax      # 0xdc20
cmpl $0x0, (%rax,%r12,8)
je 0x78ad
leaq 0x712b(%rip), %r14      # 0xe990
addq $0x34, %r14
cmpl $0x0, 0x24(%r14)
jne 0x7865
cmpl %ebx, 0x20(%r14)
jne 0x7865
leaq 0x2643(%rip), %rdi      # 0x9ec0
xorl %eax, %eax
callq 0x2030
movl (%rbp), %esi
movl $0x37, %edi
callq 0x4f79
movq %r14, %rdi
callq 0x27b4
movl (%rbp), %esi
incl %esi
movl $0x32, %edi
callq 0x4f79
jmp 0x78ad
xorl %r13d, %r13d
movq (%rsp), %rax
movq 0x8(%rax), %r12
testq %r12, %r12
je 0x7a61
movq 0x5723(%rip), %r15      # 0xcfe8
leaq 0x7fe4(%rip), %r14      # 0xf8b0
leaq 0x1c3e(%rip), %rbx      # 0x9511
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 0x78fd
andb %cl, %al
je 0x7916
callq 0x75db
callq 0x72c9
movl $0x32, %edi
movl $0x1, %esi
callq 0x4f79
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 0x4f79
addl $-0x5, (%r14)
cmpl $0x0, 0x8(%r12)
je 0x795c
movl 0xc(%r12), %eax
cmpl $0x2, %eax
setne %cl
orb %r13b, %cl
jne 0x798a
leaq 0x1be2(%rip), %rdi      # 0x953c
jmp 0x7963
leaq 0x1bce(%rip), %rdi      # 0x9531
xorl %eax, %eax
callq 0x2030
movl (%r14), %edi
movl (%rbp), %esi
incl %esi
callq 0x4f79
movq 0x38(%r12), %r12
testq %r12, %r12
jne 0x78d7
jmp 0x7a52
cmpl $0x1, %eax
jne 0x79c8
movl 0x10(%r12), %esi
movl 0x14(%r12), %edx
leaq 0x1ba7(%rip), %rdi      # 0x9547
xorl %eax, %eax
callq 0x2030
cmpl $0x0, 0x20(%r12)
leaq 0x1b9e(%rip), %rdi      # 0x9552
leaq 0x1c6a(%rip), %rax      # 0x9625
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x2030
jmp 0x7a0b
testl %eax, %eax
setne %al
orb %r13b, %al
jne 0x796a
leaq 0x1b8a(%rip), %rdi      # 0x9563
xorl %eax, %eax
callq 0x2030
cmpl $0x0, 0x20(%r12)
leaq 0x1b7b(%rip), %rdi      # 0x9568
leaq 0x1c31(%rip), %rax      # 0x9625
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x2030
cmpl $0x0, 0x24(%r12)
je 0x796a
movl 0x18(%r12), %esi
testl %esi, %esi
je 0x7a24
leaq 0x1b3b(%rip), %rdi      # 0x9556
xorl %eax, %eax
callq 0x2030
jmp 0x7a32
leaq 0x1bf9(%rip), %rdi      # 0x9624
xorl %eax, %eax
callq 0x2030
movl 0x1c(%r12), %esi
testl %esi, %esi
je 0x796a
leaq 0x1b16(%rip), %rdi      # 0x955c
xorl %eax, %eax
callq 0x2030
jmp 0x796a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2477(%rip), %rdi      # 0x9edf
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 0x4f79