// File: /workspace/github_c_makefile_star2_O0/beejjorgensen[P]conquest/conqtf.c
// Function: split_tf
void split_tf(int *Tf2num, int *New2tf)
{
    int tf_num, new_tf;
    char ships;
    int x, y, n_ships;
    int ind;
    char iline[81];
    new_tf = *New2tf;
    tf_num = *Tf2num;
    get_tf(player, &new_tf, tf[player][tf_num].dest);
    tf_stars[tf[player][tf_num].dest][player]++;
    printw(" ships:");
    point(8, y_cursor);
    get_line(iline, &ind, false);
    get_token(iline, &ind, &n_ships, &ships);
    if (ships == ' ') {         /*entire fleet */
        tf[player][new_tf].s = tf[player][tf_num].s;
        tf[player][new_tf].t = tf[player][tf_num].t;
        tf[player][new_tf].c = tf[player][tf_num].c;
        tf[player][new_tf].b = tf[player][tf_num].b;
        tf[player][tf_num].s = 0;
        tf[player][tf_num].t = 0;
        tf[player][tf_num].c = 0;
        tf[player][tf_num].b = 0;
    } else {
        do {
            switch (ships) {
            case 'T':
                if (tf[player][tf_num].t < n_ships)
                    n_ships = tf[player][tf_num].t;
                tf[player][tf_num].t = tf[player][tf_num].t - n_ships;
                tf[player][new_tf].t = tf[player][new_tf].t + n_ships;
                break;
            case 'S':
                if (tf[player][tf_num].s < n_ships)
                    n_ships = tf[player][tf_num].s;
                tf[player][tf_num].s = tf[player][tf_num].s - n_ships;
                tf[player][new_tf].s = tf[player][new_tf].s + n_ships;
                break;
            case 'C':
                if (tf[player][tf_num].c < n_ships)
                    n_ships = tf[player][tf_num].c;
                tf[player][tf_num].c = tf[player][tf_num].c - n_ships;
                tf[player][new_tf].c = tf[player][new_tf].c + n_ships;
                break;
            case 'B':
                if (tf[player][tf_num].b < n_ships)
                    n_ships = tf[player][tf_num].b;
                tf[player][tf_num].b = tf[player][tf_num].b - n_ships;
                tf[player][new_tf].b = tf[player][new_tf].b + n_ships;
                break;
            default:
                error_message();
                printw("  ! Illegal field %c", ships);
            };                  /*switch ( */
            get_token(iline, &ind, &n_ships, &ships);
        }
        while (ships != ' ');
    };
    x = tf[player][tf_num].x;
    y = tf[player][tf_num].y;
    zero_tf(player, tf_num);
    zero_tf(player, new_tf);
    on_board(x, y);
    *Tf2num = tf_num;
    *New2tf = new_tf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x7e50(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %edx
movl $0x1, %edi
leaq -0x18(%rbp), %rsi
callq 0x2e80
movslq -0x14(%rbp), %rcx
leaq 0x7e27(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movslq 0x20(%rax), %rcx
leaq 0x709f(%rip), %rax      # 0x12c30
movl 0x4(%rax,%rcx,8), %edx
addl $0x1, %edx
leaq 0x7091(%rip), %rax      # 0x12c30
movl %edx, 0x4(%rax,%rcx,8)
leaq 0x35a1(%rip), %rdi      # 0xf14b
movb $0x0, %al
callq 0x2030
leaq 0x8d0c(%rip), %rax      # 0x148c4
movl (%rax), %esi
movl $0x8, %edi
callq 0x69f0
leaq -0x80(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
xorl %edx, %edx
callq 0xa4b0
leaq -0x80(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x19(%rbp), %rcx
callq 0xa7e0
movsbl -0x19(%rbp), %eax
cmpl $0x20, %eax
jne 0xbd4e
movslq -0x14(%rbp), %rcx
leaq 0x7da0(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
movslq -0x18(%rbp), %rdx
leaq 0x7d85(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x7d6a(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
movslq -0x18(%rbp), %rdx
leaq 0x7d4f(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x7d34(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
movslq -0x18(%rbp), %rdx
leaq 0x7d19(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x7cfe(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %ecx
movslq -0x18(%rbp), %rdx
leaq 0x7ce3(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x1c(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x7cc8(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x10(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x7ca9(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x14(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x7c8a(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x18(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x7c6b(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x1c(%rax)
jmp 0xc08c
jmp 0xbd50
movsbl -0x19(%rbp), %eax
addl $-0x42, %eax
movl %eax, %ecx
movq %rcx, -0x88(%rbp)
subl $0x12, %eax
ja 0xc051
movq -0x88(%rbp), %rax
leaq 0x3359(%rip), %rcx      # 0xf0d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq -0x14(%rbp), %rcx
leaq 0x7c15(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
cmpl -0x28(%rbp), %eax
jge 0xbdbe
movslq -0x14(%rbp), %rcx
leaq 0x7bf5(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %eax
movl %eax, -0x28(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x7bd7(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
subl -0x28(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x7bb9(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x7b9e(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x14(%rax), %ecx
addl -0x28(%rbp), %ecx
movslq -0x18(%rbp), %rdx
leaq 0x7b80(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
jmp 0xc068
movslq -0x14(%rbp), %rcx
leaq 0x7b60(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
cmpl -0x28(%rbp), %eax
jge 0xbe73
movslq -0x14(%rbp), %rcx
leaq 0x7b40(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
movl %eax, -0x28(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x7b22(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
subl -0x28(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x7b04(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x7ae9(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
addl -0x28(%rbp), %ecx
movslq -0x18(%rbp), %rdx
leaq 0x7acb(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
jmp 0xc068
movslq -0x14(%rbp), %rcx
leaq 0x7aab(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
cmpl -0x28(%rbp), %eax
jge 0xbf28
movslq -0x14(%rbp), %rcx
leaq 0x7a8b(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
movl %eax, -0x28(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x7a6d(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
subl -0x28(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x7a4f(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x7a34(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
addl -0x28(%rbp), %ecx
movslq -0x18(%rbp), %rdx
leaq 0x7a16(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
jmp 0xc068
movslq -0x14(%rbp), %rcx
leaq 0x79f6(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
cmpl -0x28(%rbp), %eax
jge 0xbfdd
movslq -0x14(%rbp), %rcx
leaq 0x79d6(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
movl %eax, -0x28(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x79b8(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %ecx
subl -0x28(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x799a(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x1c(%rax)
movslq -0x18(%rbp), %rcx
leaq 0x797f(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %ecx
addl -0x28(%rbp), %ecx
movslq -0x18(%rbp), %rdx
leaq 0x7961(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x1c(%rax)
jmp 0xc068
callq 0xa7c0
movsbl -0x19(%rbp), %esi
leaq 0x30f2(%rip), %rdi      # 0xf153
movb $0x0, %al
callq 0x2030
leaq -0x80(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x19(%rbp), %rcx
callq 0xa7e0
movsbl -0x19(%rbp), %eax
cmpl $0x20, %eax
jne 0xbd50
jmp 0xc08c
movslq -0x14(%rbp), %rcx
leaq 0x7909(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x20(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x78ec(%rip), %rax      # 0x139a0
addq $0x57c, %rax            # imm = 0x57C
imulq $0x34, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %esi
movl $0x1, %edi
callq 0x4280
movl -0x18(%rbp), %esi
movl $0x1, %edi
callq 0x4280
movl -0x20(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0xaa50
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)