// File: /workspace/github_c_makefile_star2_O0/ArchLuke[P]YouSuck/Engine.c
// Function: PrintBoard
void PrintBoard(const S_BOARD *pos) {
    
    int sq,file,rank,piece;

    printf("\nGame Board:\n\n");
    
    for(rank = RANK_8; rank >= RANK_1; rank--) {
        printf("%d  ",rank+1);
        for(file = FILE_A; file <= FILE_H; file++) {
            sq = FR2SQ(file,rank);
            piece = pos->pieces[sq];
            printf("%3c",PceChar[piece]);
        }
        printf("\n");
    }
    
    printf("\n   ");
    for(file = FILE_A; file <= FILE_H; file++) {
        printf("%3c",'a'+file);    
    }
    printf("\n");
    printf("side:%c\n",SideChar[pos->side]);
    printf("enPas:%d\n",pos->enPas);
    printf("castle:%c%c%c%c\n",
            pos->castlePerm & WKCA ? 'K' : '-',
            pos->castlePerm & WQCA ? 'Q' : '-',
            pos->castlePerm & BKCA ? 'k' : '-',
            pos->castlePerm & BQCA ? 'q' : '-'    
            );
    printf("PosKey:%llX\n",pos->posKey);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
leaq 0xa65c(%rip), %rdi      # 0xbbcc
movb $0x0, %al
callq 0x1060
movl $0x7, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jl 0x1618
movl 0x4(%rsp), %esi
addl $0x1, %esi
leaq 0xa643(%rip), %rdi      # 0xbbdb
movb $0x0, %al
callq 0x1060
movl $0x0, 0x8(%rsp)
cmpl $0x7, 0x8(%rsp)
jg 0x15fa
movl 0x8(%rsp), %eax
addl $0x15, %eax
imull $0xa, 0x4(%rsp), %ecx
addl %ecx, %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movslq 0xc(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, (%rsp)
movslq (%rsp), %rcx
leaq 0xa352(%rip), %rax      # 0xb92d
movsbl (%rax,%rcx), %esi
leaq 0xa5fa(%rip), %rdi      # 0xbbe0
movb $0x0, %al
callq 0x1060
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x15a7
leaq 0xa5d8(%rip), %rdi      # 0xbbd9
movb $0x0, %al
callq 0x1060
movl 0x4(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x157f
leaq 0xa5c5(%rip), %rdi      # 0xbbe4
movb $0x0, %al
callq 0x1060
movl $0x0, 0x8(%rsp)
cmpl $0x7, 0x8(%rsp)
jg 0x1657
movl 0x8(%rsp), %esi
addl $0x61, %esi
leaq 0xa59d(%rip), %rdi      # 0xbbe0
movb $0x0, %al
callq 0x1060
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x162e
leaq 0xa57b(%rip), %rdi      # 0xbbd9
movb $0x0, %al
callq 0x1060
movq 0x10(%rsp), %rax
movslq 0x200(%rax), %rcx
leaq 0xa2cc(%rip), %rax      # 0xb944
movsbl (%rax,%rcx), %esi
leaq 0xa566(%rip), %rdi      # 0xbbe9
movb $0x0, %al
callq 0x1060
movq 0x10(%rsp), %rax
movl 0x204(%rax), %esi
leaq 0xa556(%rip), %rdi      # 0xbbf2
movb $0x0, %al
callq 0x1060
movq 0x10(%rsp), %rax
movl 0x214(%rax), %ecx
andl $0x1, %ecx
movl $0x2d, %esi
movl $0x4b, %eax
cmpl $0x0, %ecx
cmovnel %eax, %esi
movq 0x10(%rsp), %rax
movl 0x214(%rax), %ecx
andl $0x2, %ecx
movl $0x2d, %edx
movl $0x51, %eax
cmpl $0x0, %ecx
cmovnel %eax, %edx
movq 0x10(%rsp), %rax
movl 0x214(%rax), %edi
andl $0x4, %edi
movl $0x2d, %ecx
movl $0x6b, %eax
cmpl $0x0, %edi
cmovnel %eax, %ecx
movq 0x10(%rsp), %rax
movl 0x214(%rax), %edi
andl $0x8, %edi
movl $0x2d, %r8d
movl $0x71, %eax
cmpl $0x0, %edi
cmovnel %eax, %r8d
leaq 0xa4d8(%rip), %rdi      # 0xbbfc
movb $0x0, %al
callq 0x1060
movq 0x10(%rsp), %rax
movq 0x220(%rax), %rsi
leaq 0xa4cf(%rip), %rdi      # 0xbc0d
movb $0x0, %al
callq 0x1060
addq $0x18, %rsp
retq
nopw (%rax,%rax)