// File: mikeakohn[P]cloudtari/build/../src/TIA.cxx
// Function: TIA::dump()
void TIA::dump()
{
  printf("TIA: pos_x=%d pos_y=%d  wait_for_hsync=%s\n",
    pos_x, pos_y, wait_for_hsync() ? "on" : "off");

  printf("playfield: ");
  for (int n = 0; n < 40; n++)
  {
    printf("%c", (playfield.data & (1ULL << n)) != 0 ? '*' : '.');
  }
  printf("\n");

  printf("player_0: ");
  for (int n = 0; n < 8; n++)
  {
    printf("%c", (player_0.data & (1 << n)) != 0 ? '*' : '.');
  }
  printf(" x=%d (move=%d)\n",
    player_0.start_pos,
    player_0.move);

  printf("player_1: ");
  for (int n = 0; n < 8; n++)
  {
    printf("%c", (player_1.data & (1 << n)) != 0 ? '*' : '.');
  }
  printf(" x=%d (move=%d)\n",
    player_1.start_pos,
    player_1.move);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
movl 0x8(%rdi), %eax
movl %eax, -0x1c(%rbp)
movl 0xc(%rdi), %eax
movl %eax, -0x18(%rbp)
callq 0x51d0
movl -0x1c(%rbp), %esi
movl -0x18(%rbp), %edx
movb %al, %dil
leaq 0x4505(%rip), %rcx      # 0xfb4a
leaq 0x44fb(%rip), %rax      # 0xfb47
testb $0x1, %dil
cmovneq %rax, %rcx
leaq 0x44c1(%rip), %rdi      # 0xfb1c
movb $0x0, %al
callq 0x4050
leaq 0x44e5(%rip), %rdi      # 0xfb4e
movb $0x0, %al
callq 0x4050
movl $0x0, -0xc(%rbp)
cmpl $0x28, -0xc(%rbp)
jge 0xb6d2
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq -0x38(%rbp), %rcx
andq %rax, %rcx
movb $0x2a, %al
movb $0x2e, %dl
movb %dl, -0x2a(%rbp)
cmpq $0x0, %rcx
movb %al, -0x29(%rbp)
jne 0xb6b3
movb -0x2a(%rbp), %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
movsbl %al, %esi
leaq 0x449a(%rip), %rdi      # 0xfb5a
movb $0x0, %al
callq 0x4050
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xb677
leaq 0x4ab3(%rip), %rdi      # 0x1018c
movb $0x0, %al
callq 0x4050
leaq 0x4476(%rip), %rdi      # 0xfb5d
movb $0x0, %al
callq 0x4050
movl $0x0, -0x10(%rbp)
cmpl $0x8, -0x10(%rbp)
jge 0xb749
movq -0x28(%rbp), %rax
movzbl 0x30(%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x10(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl -0x40(%rbp), %ecx
andl %eax, %ecx
movb $0x2a, %al
movb $0x2e, %dl
movb %dl, -0x3a(%rbp)
cmpl $0x0, %ecx
movb %al, -0x39(%rbp)
jne 0xb72a
movb -0x3a(%rbp), %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
movsbl %al, %esi
leaq 0x4423(%rip), %rdi      # 0xfb5a
movb $0x0, %al
callq 0x4050
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xb6f5
movq -0x28(%rbp), %rax
movl 0x3c(%rax), %esi
movl 0x40(%rax), %edx
leaq 0x440e(%rip), %rdi      # 0xfb68
movb $0x0, %al
callq 0x4050
leaq 0x4411(%rip), %rdi      # 0xfb79
movb $0x0, %al
callq 0x4050
movl $0x0, -0x14(%rbp)
cmpl $0x8, -0x14(%rbp)
jge 0xb7ca
movq -0x28(%rbp), %rax
movzbl 0x44(%rax), %eax
movl %eax, -0x48(%rbp)
movl -0x14(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl -0x48(%rbp), %ecx
andl %eax, %ecx
movb $0x2a, %al
movb $0x2e, %dl
movb %dl, -0x42(%rbp)
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
jne 0xb7ab
movb -0x42(%rbp), %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
movsbl %al, %esi
leaq 0x43a2(%rip), %rdi      # 0xfb5a
movb $0x0, %al
callq 0x4050
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xb776
movq -0x28(%rbp), %rax
movl 0x50(%rax), %esi
movl 0x54(%rax), %edx
leaq 0x438d(%rip), %rdi      # 0xfb68
movb $0x0, %al
callq 0x4050
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)