// File: /workspace/github_c_makefile_star2_O0/beejjorgensen[P]conquest/conqpl.c
// Function: bl2st_planet
void bl2st_planet(void)
{
    char tf_char, pl_char;
    int tf_num, planet_num;
    tplanet *pplanet;
    int factors, starnum;
    boolean see, done;
    char iline[81];
    int ind, amount;
    char dum;
    printw("last");
    cle3r_left();
    point(1, 19);
    printw("Firing TF:");
    get_char(&tf_char);
    tf_num = tf_char - 'A' + 1;
    if ((tf_num < 1) || (tf_num > 26)) {
        error_message();
        printw(" !Illegal tf");
    } else if (tf[player][tf_num].dest == 0) {
        error_message();
        printw(" !Nonexistent tf");
    } else if (tf[player][tf_num].eta != 0) {
        error_message();
        printw(" !Tf is not in normal space   ");
    } else if (tf[player][tf_num].blasting) {
        error_message();
        printw(" !Tf is already blasting     ");
    } else if ((tf[player][tf_num].b == 0) && (tf[player][tf_num].c == 0)) {
        error_message();
        printw(" !Tf has no warships         ");
    } else {
        starnum = tf[player][tf_num].dest;
        pplanet = stars[starnum].first_planet;
        if (pplanet == nil) {
            error_message();
            printw(" !No planets at star %c       ", starnum + 'A' - 1);
        } else {
            point(1, 20);
            printw("Target colony ");
            if (pplanet->next == nil) {
                printw("%2d", pplanet->number);
            } else {
                printw(":");
                get_char(&pl_char);
                planet_num = pl_char - '0';
                done = false;
                while (!done) {
                    if (pplanet->number == planet_num)
                        done = true;
                    else {
                        if (pplanet->next == nil)
                            done = true;
                        else
                            pplanet = pplanet->next;
                    };
                };
                if (pplanet->number != planet_num) {
                    error_message();
                    printw(" !No such planet at this star ");
                    pplanet = nil;
                };
            };
            if (pplanet != nil) {
                if (pplanet->team == ENEMY) {
                    error_message();
                    printw(" !Conquer it first!");
                } else if ((pplanet->team == player)
                           && (!pplanet->conquered)
                    ) {
                    error_message();
                    printw(" !That is a human colony!!    ");
                } else {
                    factors = weapons[player]
                        * ((tf[player][tf_num].c * c_guns) +
                           (tf[player][tf_num].b * b_guns));
                    point(1, 21);
                    printw("Units (max %3d) :", factors / 4);
                    point(18, 21);
                    get_line(iline, &ind, false);
                    get_token(iline, &ind, &amount, &dum);
                    if (amount < 0)
                        factors = 0;
                    else if (amount > 0)
                        factors = MIN(factors, amount * 4);
                    tf[player][tf_num].blasting = true;
                    point(1, 22);
                    printw("Blasting %3d units", factors / 4);
                    blast(pplanet, factors);
                    point(1, 23);
                    left_line[23] = true;
                    addch(pplanet->pstar + 'A' - 1);
                    pplanet->psee_capacity = pplanet->capacity;
                    see = true;
                    if (((y_cursor > 21) && (x_cursor >= 50)) ||
                        (y_cursor > 24)) {
                        pause();
                        clear_field();
                        point(50, 1);
                    };
                    printw("%d:%2d                         ",
                           pplanet->number, pplanet->psee_capacity);
                    point(x_cursor + 5, y_cursor);
                    x_cursor = x_cursor - 5;
                    if (pplanet->psee_capacity == 0)
                        printw(" Decimated");
                    else if ((pplanet->team == none) && see)
                        printw(" No colony");
                    else if (pplanet->team == player) {
                        printw("(%2d,/%3d)", pplanet->inhabitants,
                               pplanet->iu);
                        if (pplanet->conquered)
                            printw("Con");
                        else
                            printw("   ");
                        if (pplanet->mb != 0)
                            printw("%2dmb", pplanet->mb);
                        else
                            printw("    ");
                        if (pplanet->amb != 0)
                            printw("%2damb", pplanet->amb);
                    } else if ((pplanet->team == ENEMY) && see) {
                        printw("*EN*");
                        if (see && pplanet->conquered) {
                            printw("Conquered");
                        } else
                            printw("   ");
                        if (pplanet->under_attack) {
                            if (pplanet->mb != 0)
                                printw("%2dmb", pplanet->mb);
                            else
                                printw("    ");
                            if (pplanet->amb != 0)
                                printw("%2damb", pplanet->amb);
                        };
                    };
                    point(x_cursor, y_cursor + 1);

                };
            };
        };
    };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
leaq 0x5ca2(%rip), %rdi      # 0xea44
movb $0x0, %al
callq 0x2030
callq 0xa720
movl $0x1, %edi
movl $0x13, %esi
callq 0x69f0
leaq 0x5c85(%rip), %rdi      # 0xea49
movb $0x0, %al
callq 0x2030
leaq -0x1(%rbp), %rdi
callq 0xa480
movsbl -0x1(%rbp), %eax
subl $0x41, %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x1, -0x8(%rbp)
jl 0x8ded
cmpl $0x1a, -0x8(%rbp)
jle 0x8e05
callq 0xa7c0
leaq 0x5775(%rip), %rdi      # 0xe56e
movb $0x0, %al
callq 0x2030
jmp 0x9480
movslq -0x8(%rbp), %rcx
leaq 0xab90(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x20(%rax)
jne 0x8e3b
callq 0xa7c0
leaq 0x574c(%rip), %rdi      # 0xe57b
movb $0x0, %al
callq 0x2030
jmp 0x947e
movslq -0x8(%rbp), %rcx
leaq 0xab5a(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x24(%rax)
je 0x8e71
callq 0xa7c0
leaq 0x5bef(%rip), %rdi      # 0xea54
movb $0x0, %al
callq 0x2030
jmp 0x947c
movslq -0x8(%rbp), %rcx
leaq 0xab24(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x2c(%rax)
je 0x8ea7
callq 0xa7c0
leaq 0x5bd8(%rip), %rdi      # 0xea73
movb $0x0, %al
callq 0x2030
jmp 0x947a
movslq -0x8(%rbp), %rcx
leaq 0xaaee(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x1c(%rax)
jne 0x8efb
movslq -0x8(%rbp), %rcx
leaq 0xaad0(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
jne 0x8efb
callq 0xa7c0
leaq 0x5ba2(%rip), %rdi      # 0xea91
movb $0x0, %al
callq 0x2030
jmp 0x9478
movslq -0x8(%rbp), %rcx
leaq 0xaa9a(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
movl %eax, -0x20(%rbp)
movslq -0x20(%rbp), %rcx
leaq 0xb57c(%rip), %rax      # 0x144a0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x8f5b
callq 0xa7c0
movl -0x20(%rbp), %esi
addl $0x41, %esi
subl $0x1, %esi
leaq 0x5b60(%rip), %rdi      # 0xeaaf
movb $0x0, %al
callq 0x2030
jmp 0x9476
movl $0x1, %edi
movl $0x14, %esi
callq 0x69f0
leaq 0x5b5d(%rip), %rdi      # 0xeace
movb $0x0, %al
callq 0x2030
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x8f9c
movq -0x18(%rbp), %rax
movl (%rax), %esi
leaq 0x5de5(%rip), %rdi      # 0xed75
movb $0x0, %al
callq 0x2030
jmp 0x9033
leaq 0x5b9c(%rip), %rdi      # 0xeb3f
movb $0x0, %al
callq 0x2030
leaq -0x2(%rbp), %rdi
callq 0xa480
movsbl -0x2(%rbp), %eax
subl $0x30, %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x8fd3
jmp 0x900b
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x8fe7
movl $0x1, -0x28(%rbp)
jmp 0x9009
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x8ffb
movl $0x1, -0x28(%rbp)
jmp 0x9007
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x9009
jmp 0x8fc4
movq -0x18(%rbp), %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
je 0x9031
callq 0xa7c0
leaq 0x5abb(%rip), %rdi      # 0xeadd
movb $0x0, %al
callq 0x2030
movq $0x0, -0x18(%rbp)
jmp 0x9033
cmpq $0x0, -0x18(%rbp)
je 0x9474
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x9060
callq 0xa7c0
leaq 0x5aa8(%rip), %rdi      # 0xeafc
movb $0x0, %al
callq 0x2030
jmp 0x9472
movq -0x18(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0x908c
movq -0x18(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jne 0x908c
callq 0xa7c0
leaq 0x5a90(%rip), %rdi      # 0xeb10
movb $0x0, %al
callq 0x2030
jmp 0x9470
leaq 0xb635(%rip), %rax      # 0x146c8
movl 0x4(%rax), %eax
movslq -0x8(%rbp), %rdx
leaq 0xa8ff(%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 0xa8e2(%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, -0x1c(%rbp)
movl $0x1, %edi
movl $0x15, %esi
callq 0x69f0
movl -0x1c(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %esi
leaq 0x5a34(%rip), %rdi      # 0xeb2f
movb $0x0, %al
callq 0x2030
movl $0x12, %edi
movl $0x15, %esi
callq 0x69f0
leaq -0x80(%rbp), %rdi
leaq -0x84(%rbp), %rsi
xorl %edx, %edx
callq 0xa4b0
leaq -0x80(%rbp), %rdi
leaq -0x84(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0x89(%rbp), %rcx
callq 0xa7e0
cmpl $0x0, -0x88(%rbp)
jge 0x9153
movl $0x0, -0x1c(%rbp)
jmp 0x9191
cmpl $0x0, -0x88(%rbp)
jle 0x918f
movl -0x1c(%rbp), %eax
movl -0x88(%rbp), %ecx
shll $0x2, %ecx
cmpl %ecx, %eax
jge 0x9177
movl -0x1c(%rbp), %eax
movl %eax, -0x90(%rbp)
jmp 0x9186
movl -0x88(%rbp), %eax
shll $0x2, %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %eax
movl %eax, -0x1c(%rbp)
jmp 0x9191
movslq -0x8(%rbp), %rcx
leaq 0xa804(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x2c(%rax)
movl $0x1, %edi
movl $0x16, %esi
callq 0x69f0
movl -0x1c(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %esi
leaq 0x596e(%rip), %rdi      # 0xeb41
movb $0x0, %al
callq 0x2030
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x4700
movl $0x1, %edi
movl $0x17, %esi
callq 0x69f0
leaq 0xb6d4(%rip), %rax      # 0x148d0
movl $0x1, 0x5c(%rax)
movq 0x8de6(%rip), %rax      # 0x11ff0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movl 0x30(%rax), %esi
addl $0x41, %esi
subl $0x1, %esi
callq 0x20a0
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl $0x1, -0x24(%rbp)
leaq 0xb689(%rip), %rax      # 0x148c4
cmpl $0x15, (%rax)
jle 0x924c
leaq 0xb679(%rip), %rax      # 0x148c0
cmpl $0x32, (%rax)
jge 0x9258
leaq 0xb671(%rip), %rax      # 0x148c4
cmpl $0x18, (%rax)
jle 0x9271
callq 0xac60
callq 0xa6a0
movl $0x32, %edi
movl $0x1, %esi
callq 0x69f0
movq -0x18(%rbp), %rax
movl (%rax), %esi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
leaq 0x5344(%rip), %rdi      # 0xe5c9
movb $0x0, %al
callq 0x2030
leaq 0xb62d(%rip), %rax      # 0x148c0
movl (%rax), %edi
addl $0x5, %edi
leaq 0xb625(%rip), %rax      # 0x148c4
movl (%rax), %esi
callq 0x69f0
leaq 0xb613(%rip), %rax      # 0x148c0
movl (%rax), %ecx
subl $0x5, %ecx
leaq 0xb607(%rip), %rax      # 0x148c0
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x92d8
leaq 0x531d(%rip), %rdi      # 0xe5e9
movb $0x0, %al
callq 0x2030
jmp 0x9456
movq -0x18(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jne 0x92fb
cmpl $0x0, -0x24(%rbp)
je 0x92fb
leaq 0x5305(%rip), %rdi      # 0xe5f4
movb $0x0, %al
callq 0x2030
jmp 0x9454
movq -0x18(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0x93a0
movq -0x18(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x18(%rbp), %rax
movl 0x14(%rax), %edx
leaq 0x52e1(%rip), %rdi      # 0xe5ff
movb $0x0, %al
callq 0x2030
movq -0x18(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x933f
leaq 0x52d4(%rip), %rdi      # 0xe60a
movb $0x0, %al
callq 0x2030
jmp 0x934d
leaq 0x53fb(%rip), %rdi      # 0xe741
movb $0x0, %al
callq 0x2030
movq -0x18(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x936e
movq -0x18(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0x52a9(%rip), %rdi      # 0xe60e
movb $0x0, %al
callq 0x2030
jmp 0x937c
leaq 0x53cb(%rip), %rdi      # 0xe740
movb $0x0, %al
callq 0x2030
movq -0x18(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x939b
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %esi
leaq 0x5280(%rip), %rdi      # 0xe614
movb $0x0, %al
callq 0x2030
jmp 0x9452
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x9450
cmpl $0x0, -0x24(%rbp)
je 0x9450
leaq 0x525c(%rip), %rdi      # 0xe61b
movb $0x0, %al
callq 0x2030
cmpl $0x0, -0x24(%rbp)
je 0x93e6
movq -0x18(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x93e6
leaq 0x5243(%rip), %rdi      # 0xe620
movb $0x0, %al
callq 0x2030
jmp 0x93f4
leaq 0x5354(%rip), %rdi      # 0xe741
movb $0x0, %al
callq 0x2030
movq -0x18(%rbp), %rax
cmpl $0x0, 0x24(%rax)
je 0x944e
movq -0x18(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x941f
movq -0x18(%rbp), %rax
movl 0x18(%rax), %esi
leaq 0x51f8(%rip), %rdi      # 0xe60e
movb $0x0, %al
callq 0x2030
jmp 0x942d
leaq 0x531a(%rip), %rdi      # 0xe740
movb $0x0, %al
callq 0x2030
movq -0x18(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x944c
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %esi
leaq 0x51cf(%rip), %rdi      # 0xe614
movb $0x0, %al
callq 0x2030
jmp 0x944e
jmp 0x9450
jmp 0x9452
jmp 0x9454
jmp 0x9456
leaq 0xb463(%rip), %rax      # 0x148c0
movl (%rax), %edi
leaq 0xb45e(%rip), %rax      # 0x148c4
movl (%rax), %esi
addl $0x1, %esi
callq 0x69f0
jmp 0x9472
jmp 0x9474
jmp 0x9476
jmp 0x9478
jmp 0x947a
jmp 0x947c
jmp 0x947e
jmp 0x9480
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)