// File: /workspace/github_c_makefile_star2_O0/beejjorgensen[P]conquest/conqs1.c
// Function: set_des
void set_des(int tf_num, boolean *Err0r)
{
    boolean error;
    int st_num, min_eta;
    char istar;
    float r;
    int dst;
    int from_star;
    if ((tf[player][tf_num].eta != 0)) {        /*cancel */
        tf[player][tf_num].eta = 0;
        from_star =
            board[tf[player][tf_num].x][tf[player][tf_num].y].star - 'A' +
            1;
        tf[player][tf_num].dest = from_star;
        tf_stars[from_star][player]++;
        printw("(Cancelling previous orders)");
        point(1, y_cursor + 1);
    };
    error = true;
    printw(" to star:");
    point(10, y_cursor);
    get_char(&istar);
    st_num = istar - 'A' + 1;
    if ((st_num < 0) || (st_num > nstars)) {
        error_message();
        printw("  !illegal star");
    } else {
        r = sqrt((float) (((stars[st_num].x - tf[1][tf_num].x) *
                           (stars[st_num].x - tf[1][tf_num].x)) +
                          ((stars[st_num].y - tf[1][tf_num].y) *
                           (stars[st_num].y - tf[1][tf_num].y))));
        point(1, y_cursor + 1);
        printw("   distance:%5.1f", r);
        dst = r - 0.049 + 1;
        if ((dst > range[player]) &&
            ((tf[1][tf_num].b != 0) ||
             (tf[1][tf_num].c != 0) || (tf[1][tf_num].t != 0))) {
            error_message();
            printw("  !maximum range is %2d", range[player]);
        } else if (r < 0.5) {
            point(1, y_cursor + 1);
            printw("Tf remains at star");
        } else {
            min_eta = ((dst - 1) / vel[player]) + 1;
            point(1, y_cursor + 1);
            printw("eta in %2d turns", min_eta);
            tf_stars[tf[player][tf_num].dest][player]--;
            tf[player][tf_num].dest = st_num;
            tf[player][tf_num].eta = min_eta;
            tf[player][tf_num].origeta = tf[player][tf_num].eta;
            tf[player][tf_num].xf = tf[player][tf_num].x;
            tf[player][tf_num].yf = tf[player][tf_num].y;
            error = false;
        }
    }
    *Err0r = error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x9a46(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x24(%rax)
je 0xa04b
movslq -0x4(%rbp), %rcx
leaq 0x9a24(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x24(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x9a05(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movslq (%rax), %rcx
leaq 0x8dee(%rip), %rax      # 0x12da0
imulq $0xc0, %rcx, %rcx
addq %rcx, %rax
movslq -0x4(%rbp), %rdx
leaq 0x99d9(%rip), %rcx      # 0x139a0
addq $0x57c, %rcx            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rcx
movslq 0x4(%rcx), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
subl $0x41, %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movslq -0x4(%rbp), %rdx
leaq 0x99a6(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x20(%rax)
movslq -0x2c(%rbp), %rcx
leaq 0x8c1b(%rip), %rax      # 0x12c30
movl 0x4(%rax,%rcx,8), %edx
addl $0x1, %edx
leaq 0x8c0d(%rip), %rax      # 0x12c30
movl %edx, 0x4(%rax,%rcx,8)
leaq 0x4cea(%rip), %rdi      # 0xed18
movb $0x0, %al
callq 0x2030
leaq 0xa888(%rip), %rax      # 0x148c4
movl (%rax), %esi
addl $0x1, %esi
movl $0x1, %edi
callq 0x69f0
movl $0x1, -0x14(%rbp)
leaq 0x4cdc(%rip), %rdi      # 0xed35
movb $0x0, %al
callq 0x2030
leaq 0xa85d(%rip), %rax      # 0x148c4
movl (%rax), %esi
movl $0xa, %edi
callq 0x69f0
leaq -0x1d(%rbp), %rdi
callq 0xa480
movsbl -0x1d(%rbp), %eax
subl $0x41, %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0xa095
cmpl $0x15, -0x18(%rbp)
jle 0xa0ad
callq 0xa7c0
leaq 0x4c9e(%rip), %rdi      # 0xed3f
movb $0x0, %al
callq 0x2030
jmp 0xa406
movslq -0x18(%rbp), %rcx
leaq 0xa3e8(%rip), %rax      # 0x144a0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movslq -0x4(%rbp), %rdx
leaq 0x98d4(%rip), %rcx      # 0x139a0
addq $0x57c, %rcx            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rcx
subl (%rcx), %eax
movslq -0x18(%rbp), %rdx
leaq 0xa3b9(%rip), %rcx      # 0x144a0
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
movslq -0x4(%rbp), %rsi
leaq 0x98a5(%rip), %rdx      # 0x139a0
addq $0x57c, %rdx            # imm = 0x57C
imulq $0x34, %rsi, %rsi
addq %rsi, %rdx
subl (%rdx), %ecx
imull %ecx, %eax
movslq -0x18(%rbp), %rdx
leaq 0xa387(%rip), %rcx      # 0x144a0
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
movslq -0x4(%rbp), %rsi
leaq 0x9872(%rip), %rdx      # 0x139a0
addq $0x57c, %rdx            # imm = 0x57C
imulq $0x34, %rsi, %rsi
addq %rsi, %rdx
subl 0x4(%rdx), %ecx
movslq -0x18(%rbp), %rsi
leaq 0xa356(%rip), %rdx      # 0x144a0
imulq $0x18, %rsi, %rsi
addq %rsi, %rdx
movl 0x4(%rdx), %edx
movslq -0x4(%rbp), %rdi
leaq 0x9841(%rip), %rsi      # 0x139a0
addq $0x57c, %rsi            # imm = 0x57C
imulq $0x34, %rdi, %rdi
addq %rdi, %rsi
subl 0x4(%rsi), %edx
imull %edx, %ecx
addl %ecx, %eax
cvtsi2ss %eax, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x2110
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
leaq 0xa732(%rip), %rax      # 0x148c4
movl (%rax), %esi
addl $0x1, %esi
movl $0x1, %edi
callq 0x69f0
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x4b9e(%rip), %rdi      # 0xed4f
movb $0x1, %al
callq 0x2030
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x4b47(%rip), %xmm1     # 0xed10
subsd %xmm1, %xmm0
movsd 0x469b(%rip), %xmm1     # 0xe870
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
leaq 0xa4d6(%rip), %rcx      # 0x146c0
cmpl 0x4(%rcx), %eax
jle 0xa26b
movslq -0x4(%rbp), %rcx
leaq 0x97a6(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x1c(%rax)
jne 0xa249
movslq -0x4(%rbp), %rcx
leaq 0x9788(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
jne 0xa249
movslq -0x4(%rbp), %rcx
leaq 0x976a(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x14(%rax)
je 0xa26b
callq 0xa7c0
leaq 0xa46b(%rip), %rax      # 0x146c0
movl 0x4(%rax), %esi
leaq 0x4b02(%rip), %rdi      # 0xed61
movb $0x0, %al
callq 0x2030
jmp 0xa404
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x404c(%rip), %xmm0     # 0xe2c8
ucomisd %xmm1, %xmm0
jbe 0xa2ab
leaq 0xa63b(%rip), %rax      # 0x148c4
movl (%rax), %esi
addl $0x1, %esi
movl $0x1, %edi
callq 0x69f0
leaq 0x4ada(%rip), %rdi      # 0xed79
movb $0x0, %al
callq 0x2030
jmp 0xa402
movl -0x28(%rbp), %eax
subl $0x1, %eax
leaq 0xa400(%rip), %rcx      # 0x146b8
cltd
idivl 0x4(%rcx)
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
leaq 0xa5fb(%rip), %rax      # 0x148c4
movl (%rax), %esi
addl $0x1, %esi
movl $0x1, %edi
callq 0x69f0
movl -0x1c(%rbp), %esi
leaq 0x4aaa(%rip), %rdi      # 0xed8c
movb $0x0, %al
callq 0x2030
movslq -0x4(%rbp), %rcx
leaq 0x96ac(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movslq 0x20(%rax), %rcx
leaq 0x8924(%rip), %rax      # 0x12c30
movl 0x4(%rax,%rcx,8), %edx
addl $-0x1, %edx
leaq 0x8916(%rip), %rax      # 0x12c30
movl %edx, 0x4(%rax,%rcx,8)
movl -0x18(%rbp), %ecx
movslq -0x4(%rbp), %rdx
leaq 0x9674(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x20(%rax)
movl -0x1c(%rbp), %ecx
movslq -0x4(%rbp), %rdx
leaq 0x9656(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x24(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x963b(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x24(%rax), %ecx
movslq -0x4(%rbp), %rdx
leaq 0x9620(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x28(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x9605(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %ecx
movslq -0x4(%rbp), %rdx
leaq 0x95eb(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x8(%rax)
movslq -0x4(%rbp), %rcx
leaq 0x95d0(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movslq -0x4(%rbp), %rdx
leaq 0x95b5(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc(%rax)
movl $0x0, -0x14(%rbp)
jmp 0xa404
jmp 0xa406
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop