LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: mikeakohn[P]cloudtari/build/../src/RIOT.cxx
// Function: RIOT::write_memory(int, unsigned char)
void RIOT::write_memory(int address, uint8_t value)
{
  // 128 bytes of RAM.
  if (address >= 128 && address <= 255)
  {
    ram[address] = value;
    return;
  }

  if (address >= 0x294)
  {
    // The timer is set by writing a value or count (from 1 to 255).
    // to the address of the desired interval setting according to
    // the following table:
    switch (address)
    {
      case 0x294:
        // 0x294: 1 clock
        prescale = TIM1T;
        prescale_shift = TIM1T_SHIFT;
        break;
      case 0x295:
        // 0x295: 8 clocks
        prescale = TIM8T;
        prescale_shift = TIM8T_SHIFT;
        break;
      case 0x296:
        // 0x296: 64 clocks
        prescale = TIM64T;
        prescale_shift = TIM64T_SHIFT;
        break;
      case 0x297:
        // 0x297: 1024 clocks
        prescale = T1024T;
        prescale_shift = T1024T_SHIFT;
        break;
    }

    //interrupt_timer = ((value + 1) * prescale) - 1;
    interrupt_timer = value * prescale;
    riot[4] = interrupt_timer >> prescale_shift;

    return;
  }

  // The rest of the registers should be read-only (except SWACNT maybe?).
  return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movb %al, -0xd(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x80, -0xc(%rbp)
jl 0xa31e
cmpl $0xff, -0xc(%rbp)
jg 0xa31e
movq -0x18(%rbp), %rax
movb -0xd(%rbp), %dl
movslq -0xc(%rbp), %rcx
movb %dl, 0x40(%rax,%rcx)
jmp 0xa3b7
cmpl $0x294, -0xc(%rbp)      # imm = 0x294
jl 0xa3b5
movl -0xc(%rbp), %eax
addl $0xfffffd6c, %eax       # imm = 0xFFFFFD6C
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x3, %eax
ja 0xa397
movq -0x20(%rbp), %rax
leaq 0x567f(%rip), %rcx      # 0xf9c8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movl %ecx, 0x2c(%rax)
movl 0x10(%rax), %ecx
movl %ecx, 0x30(%rax)
jmp 0xa397
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movl %ecx, 0x2c(%rax)
movl 0x14(%rax), %ecx
movl %ecx, 0x30(%rax)
jmp 0xa397
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x2c(%rax)
movl 0x18(%rax), %ecx
movl %ecx, 0x30(%rax)
jmp 0xa397
movq -0x18(%rbp), %rax
movl 0xc(%rax), %ecx
movl %ecx, 0x2c(%rax)
movl 0x1c(%rax), %ecx
movl %ecx, 0x30(%rax)
movq -0x18(%rbp), %rax
movzbl -0xd(%rbp), %ecx
imull 0x2c(%rax), %ecx
movl %ecx, 0x34(%rax)
movl 0x34(%rax), %edx
movl 0x30(%rax), %ecx
sarl %cl, %edx
movl %edx, %ecx
movb %cl, 0x3c(%rax)
jmp 0xa3b7
jmp 0xa3b7
popq %rbp
retq
nopl (%rax)
// File: mikeakohn[P]cloudtari/build/../src/RIOT.cxx
// Function: RIOT::clock(int)
void RIOT::clock(int ticks)
{
  while (ticks > 0)
  {
    interrupt_timer--;

    if (interrupt_timer == 0)
    {
      prescale_shift = 0;
    }

    ticks--;
  }

  riot[4] = (interrupt_timer >> prescale_shift) & 0xff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0xa402
movq -0x18(%rbp), %rax
movl 0x34(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x34(%rax)
cmpl $0x0, 0x34(%rax)
jne 0xa3f7
movq -0x18(%rbp), %rax
movl $0x0, 0x30(%rax)
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa3d3
movq -0x18(%rbp), %rax
movl 0x34(%rax), %edx
movl 0x30(%rax), %ecx
sarl %cl, %edx
movl %edx, %ecx
andl $0xff, %ecx
movb %cl, 0x3c(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/ROM.cxx
// Function: ROM::load(char const*)
int ROM::load(const char *filename)
{
  struct stat statbuf;
  memset(&statbuf, 0, sizeof(statbuf));
  stat(filename, &statbuf);

  const int file_size = statbuf.st_size;

  if (file_size != 2048 &&
      file_size != 4096 &&
      file_size != 8192)
  {
    printf("Error: ROM size is not 2048, 4096, 8192 (%d)\n", file_size);
    return -1;
  }

  FILE *in = fopen(filename, "rb");

  if (in == NULL)
  {
    printf("Error: Couldn't open file %s\n", filename);
    return -1;
  }

  size = fread(full, 1, statbuf.st_size, in);
  fclose(in);

  if (size != statbuf.st_size)
  {
    printf("Error: Could not load ROM %d/%d\n", size, file_size);
    return -2;
  }

  if (size == 2048)
  {
    memcpy(memory +    0, full, 2048);
    memcpy(memory + 2048, full, 2048);
  }
    else
  {
    memcpy(memory, full, 4096);
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc0(%rbp)
leaq -0xa8(%rbp), %rdi
xorl %esi, %esi
movl $0x90, %edx
callq 0x4170
movq -0x18(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x4220
movq -0x78(%rbp), %rax
movl %eax, -0xac(%rbp)
cmpl $0x800, -0xac(%rbp)     # imm = 0x800
je 0xa4ef
cmpl $0x1000, -0xac(%rbp)    # imm = 0x1000
je 0xa4ef
cmpl $0x2000, -0xac(%rbp)    # imm = 0x2000
je 0xa4ef
movl -0xac(%rbp), %esi
leaq 0x54fc(%rip), %rdi      # 0xf9d8
movb $0x0, %al
callq 0x4050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa61f
movq -0x18(%rbp), %rdi
leaq 0x4dc8(%rip), %rsi      # 0xf2c2
callq 0x42d0
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0xb8(%rbp)
jne 0xa52e
movq -0x18(%rbp), %rsi
leaq 0x54eb(%rip), %rdi      # 0xfa06
movb $0x0, %al
callq 0x4050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa61f
movq -0xc0(%rbp), %rdi
addq $0x1000, %rdi           # imm = 0x1000
movq -0x78(%rbp), %rdx
movq -0xb8(%rbp), %rcx
movl $0x1, %esi
callq 0x43a0
movq %rax, %rcx
movq -0xc0(%rbp), %rax
movl %ecx, 0x3000(%rax)
movq -0xb8(%rbp), %rdi
callq 0x4250
movq -0xc0(%rbp), %rax
movslq 0x3000(%rax), %rax
cmpq -0x78(%rbp), %rax
je 0xa5ab
movq -0xc0(%rbp), %rax
movl 0x3000(%rax), %esi
movl -0xac(%rbp), %edx
leaq 0x5489(%rip), %rdi      # 0xfa24
movb $0x0, %al
callq 0x4050
movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE
jmp 0xa61f
movq -0xc0(%rbp), %rax
cmpl $0x800, 0x3000(%rax)    # imm = 0x800
jne 0xa5fd
movq -0xc0(%rbp), %rdi
movq %rdi, %rsi
addq $0x1000, %rsi           # imm = 0x1000
movl $0x800, %edx            # imm = 0x800
callq 0x41f0
movq -0xc0(%rbp), %rsi
movq %rsi, %rdi
addq $0x800, %rdi            # imm = 0x800
addq $0x1000, %rsi           # imm = 0x1000
movl $0x800, %edx            # imm = 0x800
callq 0x41f0
jmp 0xa618
movq -0xc0(%rbp), %rdi
movq %rdi, %rsi
addq $0x1000, %rsi           # imm = 0x1000
movl $0x1000, %edx           # imm = 0x1000
callq 0x41f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.cxx
// Function: TIA::TIA()
TIA::TIA() :
  pos_x{0},
  pos_y{0},
  hsync_latch{false},
  image_32{nullptr},
  image_8{nullptr},
  check_events{false},
  fps{0},
  timestamp{0}
{
  for (int n = 0; n < 256; n++)
  {
    reverse[n]=
      (((n & 0x01) << 7) | ((n & 0x02) << 5) |
       ((n & 0x04) << 3) | ((n & 0x08) << 1) |
       ((n & 0x10) >> 1) | ((n & 0x20) >> 3) |
       ((n & 0x40) >> 5) | ((n & 0x80) >> 7));
  }

  reset();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl $0x0, 0x8(%rdi)
movl $0x0, 0xc(%rdi)
movb $0x0, 0x10(%rdi)
addq $0x18, %rdi
callq 0xb7f0
movq -0x18(%rbp), %rdi
addq $0x30, %rdi
callq 0xb810
movq -0x18(%rbp), %rdi
addq $0x44, %rdi
callq 0xb810
movq -0x18(%rbp), %rdi
addq $0x58, %rdi
callq 0xb850
movq -0x18(%rbp), %rdi
addq $0x64, %rdi
callq 0xb850
movq -0x18(%rbp), %rdi
addq $0x70, %rdi
callq 0xb870
movq -0x18(%rbp), %rax
movq $0x0, 0x1d0(%rax)
movq $0x0, 0x1d8(%rax)
movb $0x0, 0x1e4(%rax)
movl $0x0, 0x1e8(%rax)
movq $0x0, 0x1f0(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jge 0xa7b9
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
andl $0x1, %ecx
shll $0x7, %ecx
movl -0xc(%rbp), %edx
andl $0x2, %edx
shll $0x5, %edx
orl %edx, %ecx
movl -0xc(%rbp), %edx
andl $0x4, %edx
shll $0x3, %edx
orl %edx, %ecx
movl -0xc(%rbp), %edx
andl $0x8, %edx
shll %edx
orl %edx, %ecx
movl -0xc(%rbp), %edx
andl $0x10, %edx
sarl %edx
orl %edx, %ecx
movl -0xc(%rbp), %edx
andl $0x20, %edx
sarl $0x3, %edx
orl %edx, %ecx
movl -0xc(%rbp), %edx
andl $0x40, %edx
sarl $0x5, %edx
orl %edx, %ecx
movl -0xc(%rbp), %edx
andl $0x80, %edx
sarl $0x7, %edx
orl %edx, %ecx
movb %cl, %dl
movslq -0xc(%rbp), %rcx
movb %dl, 0xd0(%rax,%rcx)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa73d
movq -0x18(%rbp), %rdi
callq 0xa7d0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.cxx
// Function: TIA::reset()
void TIA::reset()
{
  pos_x = 0;
  pos_y = 0;
  hsync_latch = false;

  playfield.reset();

  memset(write_regs, 0, sizeof(write_regs));
  memset(read_regs, 0, sizeof(read_regs));

  read_regs[INPT4] = 0x80;
  read_regs[INPT5] = 0x80;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movl $0x0, 0x8(%rdi)
movl $0x0, 0xc(%rdi)
movb $0x0, 0x10(%rdi)
addq $0x18, %rdi
callq 0xb8a0
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x4170
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x4170
movq -0x10(%rbp), %rax
movb $-0x80, 0xcc(%rax)
movb $-0x80, 0xcd(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.cxx
// Function: TIA::player_size(TIA::Player&, int)
void TIA::player_size(Player &player, int value)
{
  int temp = value & 7;

  player.set_scale(1);

  switch (temp)
  {
    case 0:
      // One copy.
      break;
    case 1:
      // Two copies close.
      break;
    case 2:
      // Two copies med.
      break;
    case 3:
      // Three copies close.
      break;
    case 4:
      // Two copies wide.
      break;
    case 5:
      // Double size player.
      player.set_scale(2);
      break;
    case 6:
      // 3 copies medium.
      break;
    case 7:
      // Quad size player.
      player.set_scale(4);
      break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0xbbd0
movl -0x18(%rbp), %eax
movq %rax, -0x20(%rbp)
subq $0x7, %rax
ja 0xae25
movq -0x20(%rbp), %rax
leaq 0x4d0a(%rip), %rcx      # 0xfafc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0xae25
jmp 0xae25
jmp 0xae25
jmp 0xae25
jmp 0xae25
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0xbbd0
jmp 0xae25
jmp 0xae25
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0xbbd0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.cxx
// Function: TIA::build_player_0()
void TIA::build_player_0()
{
  if ((write_regs[REFP0] & 0x08) == 0)
  {
    player_0.data = reverse[write_regs[GRP0]];
  }
    else
  {
    player_0.data = write_regs[GRP0];
  }

  player_0.need_update = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movzbl 0x8b(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0xae66
movq -0x10(%rbp), %rax
movzbl 0x9b(%rax), %ecx
movb 0xd0(%rax,%rcx), %cl
movb %cl, 0x30(%rax)
jmp 0xae73
movq -0x10(%rbp), %rax
movb 0x9b(%rax), %cl
movb %cl, 0x30(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x33(%rax)
popq %rbp
retq
nopl (%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.cxx
// Function: TIA::build_player_1()
void TIA::build_player_1()
{
  if ((write_regs[REFP1] & 0x08) == 0)
  {
    player_1.data = reverse[write_regs[GRP1]];
  }
    else
  {
    player_1.data = write_regs[GRP1];
  }

  player_1.need_update = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movzbl 0x8c(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0xaeb6
movq -0x10(%rbp), %rax
movzbl 0x9c(%rax), %ecx
movb 0xd0(%rax,%rcx), %cl
movb %cl, 0x44(%rax)
jmp 0xaec3
movq -0x10(%rbp), %rax
movb 0x9c(%rax), %cl
movb %cl, 0x44(%rax)
movq -0x10(%rbp), %rax
movb $0x0, 0x47(%rax)
popq %rbp
retq
nopl (%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.cxx
// Function: TIA::build_playfield()
void TIA::build_playfield()
{
  playfield.data =
    ((write_regs[PF0] >> 4) & 0x0f) |
     (reverse[write_regs[PF1]] << 4) |
     (write_regs[PF2] << 12);

  if ((write_regs[CTRLPF] & 1) == 0)
  {
    // Non-mirroed playfield
    playfield.data |= playfield.data << 20;
  }
    else
  {
    // Mirrored playfield.
    playfield.data |=
      (((uint64_t)reverse[write_regs[PF0]] & 0x0f) << 36) |
       ((uint64_t)write_regs[PF1] << 28) |
       ((uint64_t)reverse[write_regs[PF2]] << 20);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movzbl 0x8d(%rax), %ecx
sarl $0x4, %ecx
andl $0xf, %ecx
movzbl 0x8e(%rax), %edx
movzbl 0xd0(%rax,%rdx), %edx
shll $0x4, %edx
orl %edx, %ecx
movzbl 0x8f(%rax), %edx
shll $0xc, %edx
orl %edx, %ecx
movslq %ecx, %rcx
movq %rcx, 0x20(%rax)
movzbl 0x8a(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xaf39
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rcx
shlq $0x14, %rcx
orq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
jmp 0xaf80
movq -0x10(%rbp), %rax
movzbl 0x8d(%rax), %ecx
movzbl 0xd0(%rax,%rcx), %ecx
andq $0xf, %rcx
shlq $0x24, %rcx
movzbl 0x8e(%rax), %edx
shlq $0x1c, %rdx
orq %rdx, %rcx
movzbl 0x8f(%rax), %edx
movzbl 0xd0(%rax,%rdx), %edx
shlq $0x14, %rdx
orq %rdx, %rcx
orq 0x20(%rax), %rcx
movq %rcx, 0x20(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.cxx
// Function: TIA::clock()
void TIA::clock()
{
  // The main playfield area starts after 68 clocks.
  if (pos_x >= 68 && pos_y >= 40 && pos_y < 232)
  {
    // The point to the first bit to be displayed from PF0, PF1, PF2.
    if (pos_x == 68) { playfield.reset(); }

    playfield.compute_pixel(pos_x);
    player_0.compute_pixel(pos_x);
    player_1.compute_pixel(pos_x);
    missile_0.compute_pixel(pos_x);
    missile_1.compute_pixel(pos_x);
    ball.compute_pixel(pos_x);

    draw_pixel();
    compute_collisions();
  }

  pos_x++;

  if (pos_x == 68 + 160)
  {
    if (player_0.need_update) { build_player_0(); }
    if (player_1.need_update) { build_player_1(); }

    if (!hsync_latch) { write_regs[WSYNC] = 0; }

#if 0
    if (pos_y >= 40 && pos_y <= 232)
    {
      television->refresh();
    }
#endif

    if (pos_y < 40 && (pos_y & 0xf) == 0) { check_events = true; }

    pos_x = 0;
    pos_y++;

    // This really shouldn't be needed.. but..
    if (pos_y > 262) { pos_y = 0; }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x44, 0x8(%rax)
jl 0xb068
movq -0x10(%rbp), %rax
cmpl $0x28, 0xc(%rax)
jl 0xb068
movq -0x10(%rbp), %rax
cmpl $0xe8, 0xc(%rax)
jge 0xb068
movq -0x10(%rbp), %rax
cmpl $0x44, 0x8(%rax)
jne 0xafe4
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
callq 0xb8a0
movq -0x10(%rbp), %rax
movq %rax, %rdi
addq $0x18, %rdi
movl 0x8(%rax), %esi
callq 0xba20
movq -0x10(%rbp), %rax
movq %rax, %rdi
addq $0x30, %rdi
movl 0x8(%rax), %esi
callq 0xba80
movq -0x10(%rbp), %rax
movq %rax, %rdi
addq $0x44, %rdi
movl 0x8(%rax), %esi
callq 0xba80
movq -0x10(%rbp), %rax
movq %rax, %rdi
addq $0x58, %rdi
movl 0x8(%rax), %esi
callq 0xbaf0
movq -0x10(%rbp), %rax
movq %rax, %rdi
addq $0x64, %rdi
movl 0x8(%rax), %esi
callq 0xbaf0
movq -0x10(%rbp), %rax
movq %rax, %rdi
addq $0x70, %rdi
movl 0x8(%rax), %esi
callq 0xbaf0
movq -0x10(%rbp), %rdi
callq 0xb120
movq -0x10(%rbp), %rdi
callq 0xb330
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
cmpl $0xe4, 0x8(%rax)
jne 0xb10b
movq -0x10(%rbp), %rax
testb $0x1, 0x33(%rax)
je 0xb095
movq -0x10(%rbp), %rdi
callq 0xae30
movq -0x10(%rbp), %rax
testb $0x1, 0x47(%rax)
je 0xb0a8
movq -0x10(%rbp), %rdi
callq 0xae80
movq -0x10(%rbp), %rax
testb $0x1, 0x10(%rax)
jne 0xb0bd
movq -0x10(%rbp), %rax
movb $0x0, 0x82(%rax)
movq -0x10(%rbp), %rax
cmpl $0x28, 0xc(%rax)
jge 0xb0e1
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0xb0e1
movq -0x10(%rbp), %rax
movb $0x1, 0x1e4(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
cmpl $0x106, 0xc(%rax)       # imm = 0x106
jle 0xb109
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
jmp 0xb10b
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.cxx
// Function: TIA::compute_collisions()
void TIA::compute_collisions()
{
  const int m0 = missile_0.is_pixel_on();
  const int m1 = missile_1.is_pixel_on();
  const int p0 = player_0.is_pixel_on();
  const int p1 = player_1.is_pixel_on();
  const int bl = ball.is_pixel_on();
  const int pf = playfield.is_pixel_on();

  read_regs[CXM0P] |= ((m0 & p1) << 7) | ((m0 & p0) << 6);
  read_regs[CXM1P] |= ((m1 & p0) << 7) | ((m1 & p1) << 6);
  read_regs[CXP0FB] |= ((p0 & pf) << 7) | ((p0 & bl) << 6);
  read_regs[CXP1FB] |= ((p1 & pf) << 7) | ((p1 & bl) << 6);
  read_regs[CXM0FB] |= ((m0 & pf) << 7) | ((m0 & bl) << 6);
  read_regs[CXM1FB] |= ((m1 & pf) << 7) | ((m1 & bl) << 6);
  read_regs[CXBLPF] |= ((bl & pf) << 7);
  read_regs[CXPPMM] |= ((p0 & p1) << 7) | ((m0 & m1) << 6);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x58, %rdi
callq 0xbc10
movq -0x28(%rbp), %rdi
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xc(%rbp)
addq $0x64, %rdi
callq 0xbc10
movq -0x28(%rbp), %rdi
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x10(%rbp)
addq $0x30, %rdi
callq 0xbbf0
movq -0x28(%rbp), %rdi
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
addq $0x44, %rdi
callq 0xbbf0
movq -0x28(%rbp), %rdi
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x18(%rbp)
addq $0x70, %rdi
callq 0xbc10
movq -0x28(%rbp), %rdi
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
addq $0x18, %rdi
callq 0xbc30
movb %al, %cl
movq -0x28(%rbp), %rax
andb $0x1, %cl
movzbl %cl, %ecx
movl %ecx, -0x20(%rbp)
movl -0xc(%rbp), %edx
andl -0x18(%rbp), %edx
shll $0x7, %edx
movl -0xc(%rbp), %ecx
andl -0x14(%rbp), %ecx
shll $0x6, %ecx
orl %ecx, %edx
movzbl 0xc0(%rax), %ecx
orl %edx, %ecx
movb %cl, 0xc0(%rax)
movl -0x10(%rbp), %edx
andl -0x14(%rbp), %edx
shll $0x7, %edx
movl -0x10(%rbp), %ecx
andl -0x18(%rbp), %ecx
shll $0x6, %ecx
orl %ecx, %edx
movzbl 0xc1(%rax), %ecx
orl %edx, %ecx
movb %cl, 0xc1(%rax)
movl -0x14(%rbp), %edx
andl -0x20(%rbp), %edx
shll $0x7, %edx
movl -0x14(%rbp), %ecx
andl -0x1c(%rbp), %ecx
shll $0x6, %ecx
orl %ecx, %edx
movzbl 0xc2(%rax), %ecx
orl %edx, %ecx
movb %cl, 0xc2(%rax)
movl -0x18(%rbp), %edx
andl -0x20(%rbp), %edx
shll $0x7, %edx
movl -0x18(%rbp), %ecx
andl -0x1c(%rbp), %ecx
shll $0x6, %ecx
orl %ecx, %edx
movzbl 0xc3(%rax), %ecx
orl %edx, %ecx
movb %cl, 0xc3(%rax)
movl -0xc(%rbp), %edx
andl -0x20(%rbp), %edx
shll $0x7, %edx
movl -0xc(%rbp), %ecx
andl -0x1c(%rbp), %ecx
shll $0x6, %ecx
orl %ecx, %edx
movzbl 0xc4(%rax), %ecx
orl %edx, %ecx
movb %cl, 0xc4(%rax)
movl -0x10(%rbp), %edx
andl -0x20(%rbp), %edx
shll $0x7, %edx
movl -0x10(%rbp), %ecx
andl -0x1c(%rbp), %ecx
shll $0x6, %ecx
orl %ecx, %edx
movzbl 0xc5(%rax), %ecx
orl %edx, %ecx
movb %cl, 0xc5(%rax)
movl -0x1c(%rbp), %edx
andl -0x20(%rbp), %edx
shll $0x7, %edx
movzbl 0xc6(%rax), %ecx
orl %edx, %ecx
movb %cl, 0xc6(%rax)
movl -0x14(%rbp), %edx
andl -0x18(%rbp), %edx
shll $0x7, %edx
movl -0xc(%rbp), %ecx
andl -0x10(%rbp), %ecx
shll $0x6, %ecx
orl %ecx, %edx
movzbl 0xc7(%rax), %ecx
orl %edx, %ecx
movb %cl, 0xc7(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.cxx
// Function: TIA::clock(int)
void TIA::clock(int ticks)
{
  // Every CPU cycle is 3 pixels.
  ticks = ticks * 3;

  while (ticks > 0)
  {
    clock();
    ticks--;
  }

  // For some reason (according to some forum) the TIA delays setting the
  // X position for player sprites by 5 TIA clocks and ball / missile by 4.
  if (player_0.need_set_position())  { player_0.set_position(pos_x + 5); }
  if (player_1.need_set_position())  { player_1.set_position(pos_x + 5); }
  if (missile_0.need_set_position()) { missile_0.set_position(pos_x + 4); }
  if (missile_1.need_set_position()) { missile_1.set_position(pos_x + 4); }
  if (ball.need_set_position())      { ball.set_position(pos_x + 4); }

  if (hsync_latch)
  {
    write_regs[WSYNC] = 1;
    hsync_latch = false;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
imull $0x3, -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jle 0xb518
movq -0x18(%rbp), %rdi
callq 0xaf90
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xb4fe
movq -0x18(%rbp), %rdi
addq $0x30, %rdi
callq 0xbb50
testb $0x1, %al
jne 0xb52b
jmp 0xb541
movq -0x18(%rbp), %rax
movq %rax, %rdi
addq $0x30, %rdi
movl 0x8(%rax), %esi
addl $0x5, %esi
callq 0xbb70
movq -0x18(%rbp), %rdi
addq $0x44, %rdi
callq 0xbb50
testb $0x1, %al
jne 0xb554
jmp 0xb56a
movq -0x18(%rbp), %rax
movq %rax, %rdi
addq $0x44, %rdi
movl 0x8(%rax), %esi
addl $0x5, %esi
callq 0xbb70
movq -0x18(%rbp), %rdi
addq $0x58, %rdi
callq 0xbb90
testb $0x1, %al
jne 0xb57d
jmp 0xb593
movq -0x18(%rbp), %rax
movq %rax, %rdi
addq $0x58, %rdi
movl 0x8(%rax), %esi
addl $0x4, %esi
callq 0xbbb0
movq -0x18(%rbp), %rdi
addq $0x64, %rdi
callq 0xbb90
testb $0x1, %al
jne 0xb5a6
jmp 0xb5bc
movq -0x18(%rbp), %rax
movq %rax, %rdi
addq $0x64, %rdi
movl 0x8(%rax), %esi
addl $0x4, %esi
callq 0xbbb0
movq -0x18(%rbp), %rdi
addq $0x70, %rdi
callq 0xbb90
testb $0x1, %al
jne 0xb5cf
jmp 0xb5e5
movq -0x18(%rbp), %rax
movq %rax, %rdi
addq $0x70, %rdi
movl 0x8(%rax), %esi
addl $0x4, %esi
callq 0xbbb0
movq -0x18(%rbp), %rax
testb $0x1, 0x10(%rax)
je 0xb5fe
movq -0x18(%rbp), %rax
movb $0x1, 0x82(%rax)
movb $0x0, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.h
// Function: TIA::Player::Player()
Player() :
      data{0},
      set_pos{false},
      vertical_delay{false},
      need_update{false},
      scale{1},
      start_pos{0},
      move{0}
    {
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb $0x0, (%rax)
movb $0x0, 0x1(%rax)
movb $0x0, 0x2(%rax)
movb $0x0, 0x3(%rax)
movl $0x1, 0x8(%rax)
movl $0x0, 0xc(%rax)
movl $0x0, 0x10(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.h
// Function: TIA::Player::compute_pixel(int)
void compute_pixel(int pos_x)
    {
      //if (pos_x < 68) { return false; }
      if (pos_x < start_pos) { pixel_value = false; return; }
      int x = (pos_x - start_pos) / scale;
      if (x > 7) { pixel_value = false; return; }
      pixel_value = (data & (1 << x)) != 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl -0xc(%rbp), %eax
cmpl 0xc(%rcx), %eax
jge 0xbaa5
movq -0x18(%rbp), %rax
movb $0x0, 0x4(%rax)
jmp 0xbaeb
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
subl 0xc(%rcx), %eax
cltd
idivl 0x8(%rcx)
movl %eax, -0x10(%rbp)
cmpl $0x7, -0x10(%rbp)
jle 0xbac6
movq -0x18(%rbp), %rax
movb $0x0, 0x4(%rax)
jmp 0xbaeb
movq -0x18(%rbp), %rax
movzbl (%rax), %ecx
movl %ecx, -0x1c(%rbp)
movl -0x10(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl -0x1c(%rbp), %ecx
andl %edx, %ecx
cmpl $0x0, %ecx
setne %cl
andb $0x1, %cl
movb %cl, 0x4(%rax)
popq %rbp
retq
nopl (%rax)
// File: mikeakohn[P]cloudtari/build/../src/TIA.h
// Function: TIA::Sprite::compute_pixel(int)
void compute_pixel(int pos_x)
    {
      if (!enabled) { pixel_value = false; return; }
      //if (pos_x < 68) { return false; }
      int x = start_pos;
      pixel_value = pos_x >= x && pos_x < x + width;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
testb $0x1, 0x2(%rax)
jne 0xbb13
movq -0x18(%rbp), %rax
movb $0x0, 0x3(%rax)
jmp 0xbb4e
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %ecx
xorl %eax, %eax
cmpl -0x10(%rbp), %ecx
movb %al, -0x19(%rbp)
jl 0xbb41
movq -0x18(%rbp), %rdx
movl -0xc(%rbp), %eax
movl -0x10(%rbp), %ecx
movzbl (%rdx), %edx
addl %edx, %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0x19(%rbp)
movq -0x18(%rbp), %rax
movb -0x19(%rbp), %cl
andb $0x1, %cl
movb %cl, 0x3(%rax)
popq %rbp
retq
// File: mikeakohn[P]cloudtari/build/../src/TIA.h
// Function: TIA::Sprite::Sprite()
Sprite() :
      width{1},
      set_pos{false},
      enabled{false},
      start_pos{0}
    {
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movb $0x1, (%rax)
movb $0x0, 0x1(%rax)
movb $0x0, 0x2(%rax)
movl $0x0, 0x4(%rax)
popq %rbp
retq
// File: mikeakohn[P]cloudtari/build/../src/TelevisionHttp.cxx
// Function: TelevisionHttp::TelevisionHttp()
TelevisionHttp::TelevisionHttp() : gif{nullptr}, gif_length{0}, no_data_count{0}
{
  gif_compressor = new GifCompressor();
  gif_compressor->set_width(width);
  gif_compressor->set_height(height);

  image = (uint8_t *)malloc(width * height);

  memset(filename, 0, sizeof(filename));
  memset(query_string, 0, sizeof(query_string));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0xbe80
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
callq 0x99a0
jmp 0xbf28
movq -0x20(%rbp), %rdi
leaq 0x8ca5(%rip), %rax      # 0x14bd8
movq %rax, (%rdi)
movq $0x0, 0x38(%rdi)
movl $0x0, 0x40(%rdi)
movl $0x0, 0x44(%rdi)
addq $0x150, %rdi            # imm = 0x150
callq 0xcb70
jmp 0xbf5a
movl $0x20, %edi
callq 0x4260
movq %rax, -0x28(%rbp)
jmp 0xbf6a
movq -0x28(%rbp), %rdi
callq 0x58e0
jmp 0xbf75
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, 0x48(%rax)
movq 0x48(%rax), %rdi
movl 0x8(%rax), %esi
callq 0xcbb0
jmp 0xbf8f
movq -0x20(%rbp), %rax
movq 0x48(%rax), %rdi
movl 0xc(%rax), %esi
callq 0xcbd0
jmp 0xbfa1
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %eax
imull 0xc(%rcx), %eax
movslq %eax, %rdi
callq 0x4320
movq -0x20(%rbp), %rdi
movq %rax, 0x30(%rdi)
addq $0xd0, %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x4170
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x4170
addq $0x30, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0xc02c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
jmp 0xc01f
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x20, %esi
callq 0x4270
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
callq 0x99d0
movq -0x20(%rbp), %rdi
callq 0xbed0
movq -0x10(%rbp), %rdi
callq 0x43d0
nop
// File: mikeakohn[P]cloudtari/build/../src/TelevisionHttp.cxx
// Function: TelevisionHttp::init()
int TelevisionHttp::init()
{
  if (net_open(port) != 0) { return -1; }
  if (read_http() != 0) { return -1; }
  if (send_index_html() != 0) { return -1; }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rax, %rdi
addq $0x20, %rdi
movl 0x28(%rax), %esi
callq 0x9a60
cmpl $0x0, %eax
je 0xc131
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc166
movq -0x18(%rbp), %rdi
callq 0xc170
cmpl $0x0, %eax
je 0xc148
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc166
movq -0x18(%rbp), %rdi
callq 0xc490
cmpl $0x0, %eax
je 0xc15f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc166
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: mikeakohn[P]cloudtari/build/../src/TelevisionHttp.cxx
// Function: TelevisionHttp::refresh()
bool TelevisionHttp::refresh()
{
  gif_compressor->compress(image, ColorTable::get_table());

  gif = gif_compressor->get_gif_data();
  gif_length = gif_compressor->get_gif_length();

  pause();

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x48(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x18(%rbp)
callq 0xcbf0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq %rax, %rdx
callq 0x5980
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0xcc00
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movq 0x48(%rax), %rdi
callq 0xcc20
movq -0x10(%rbp), %rdi
movl %eax, 0x40(%rdi)
callq 0xcc40
movb $0x1, %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
// File: mikeakohn[P]cloudtari/build/../src/TelevisionHttp.cxx
// Function: TelevisionHttp::send_gif()
int TelevisionHttp::send_gif()
{
  std::string header =
    "HTTP/1.1 200 OK\n"
    "Content-Type: image/gif\n"
    "Cache-Control: no-cache, must-revalidate\n"
    "Pragma: no-cache\n"
    "Content-Length: " + std::to_string(gif_length) + "\n\n";

  net_send((uint8_t *)header.c_str(), header.size());
  net_send(gif, gif_length);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movl 0x40(%rax), %esi
leaq -0x68(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0xcf70
movq -0x80(%rbp), %rdx
leaq 0x38fc(%rip), %rsi      # 0x10201
leaq -0x48(%rbp), %rdi
callq 0xce40
jmp 0xc910
leaq 0x3874(%rip), %rdx      # 0x1018b
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0xcdf0
jmp 0xc926
leaq -0x48(%rbp), %rdi
callq 0x41b0
leaq -0x68(%rbp), %rdi
callq 0x41b0
movq -0x88(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x98(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x4120
movq -0xa0(%rbp), %rdi
movq %rax, -0x90(%rbp)
callq 0x41c0
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rsi
movl %eax, %edx
callq 0x9ba0
jmp 0xc984
movq -0x88(%rbp), %rax
movq %rax, %rdi
addq $0x20, %rdi
movq 0x38(%rax), %rsi
movl 0x40(%rax), %edx
callq 0x9ba0
jmp 0xc9a0
leaq -0x28(%rbp), %rdi
callq 0x41b0
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0xc9d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x41b0
leaq -0x68(%rbp), %rdi
callq 0x41b0
jmp 0xc9f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x41b0
movq -0x70(%rbp), %rdi
callq 0x43d0
// File: mikeakohn[P]cloudtari/build/../src/TelevisionHttp.cxx
// Function: TelevisionHttp::send_404()
int TelevisionHttp::send_404()
{
  const char *page = "<p>Not found</p>";

  std::string header =
    "HTTP/1.1 404 Not Found\n"
    "Content-Type: text/html\n"
    "Content-Length: " + std::to_string(strlen(page)) + "\n\n";

  net_send((uint8_t *)header.c_str(), header.size());
  net_send((uint8_t *)page, strlen(page));

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
leaq 0x3853(%rip), %rax      # 0x10274
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4130
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0xce90
movq -0x88(%rbp), %rdx
leaq 0x3836(%rip), %rsi      # 0x10285
leaq -0x50(%rbp), %rdi
callq 0xce40
jmp 0xca5a
leaq 0x372a(%rip), %rdx      # 0x1018b
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xcdf0
jmp 0xca70
leaq -0x50(%rbp), %rdi
callq 0x41b0
leaq -0x70(%rbp), %rdi
callq 0x41b0
movq -0x90(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xa0(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x4120
movq -0xa8(%rbp), %rdi
movq %rax, -0x98(%rbp)
callq 0x41c0
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
movl %eax, %edx
callq 0x9ba0
jmp 0xcace
movq -0x90(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x4130
movq -0xb8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
movl %eax, %edx
callq 0x9ba0
jmp 0xcb07
leaq -0x30(%rbp), %rdi
callq 0x41b0
xorl %eax, %eax
addq $0xc0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0xcb3e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x41b0
leaq -0x70(%rbp), %rdi
callq 0x41b0
jmp 0xcb5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x41b0
movq -0x78(%rbp), %rdi
callq 0x43d0
nopw (%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/Television.h
// Function: Television::pause()
void pause()
  {
    struct timeval now;

    gettimeofday(&now, NULL);
    long time_diff = now.tv_usec - refresh_time.tv_usec;
    while (time_diff < 0) { now.tv_sec--; time_diff += 1000000; }
    time_diff += (now.tv_sec - refresh_time.tv_sec) * 1000000;

#if 0
    struct timespec now;
    clock_gettime(CLOCK_MONOTONIC, &now);
    long time_diff = now.tv_nsec - refresh_time.tv_nsec;
    while (time_diff < 0) { now.tv_sec--; time_diff += 1000000000; }
    time_diff += (now.tv_sec - refresh_time.tv_sec) * 1000000000;
    time_diff = time_diff / 1000;
#endif

    // 1,000,000 us / 60 fps = 16667
    // 1,000,000 us / 30 fps = 33333
    // FIXME: The TV should be 60fps, but for some reason 33333
    // is coming out at 60fps in the TIA.
    if (time_diff < 33333)
    {
      usleep(33333 - time_diff);
    }

    refresh_time = now;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x43c0
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
subq 0x18(%rcx), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jge 0xcc94
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0xf4240, %rax          # imm = 0xF4240
movq %rax, -0x20(%rbp)
jmp 0xcc71
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
subq 0x10(%rcx), %rax
imulq $0xf4240, %rax, %rax    # imm = 0xF4240
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x8235, -0x20(%rbp)    # imm = 0x8235
jge 0xccc9
movl $0x8235, %eax           # imm = 0x8235
subq -0x20(%rbp), %rax
movl %eax, %edi
callq 0x4380
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x18(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: mikeakohn[P]cloudtari/build/../src/TelevisionHttp.h
// Function: TelevisionHttp::KeyQueue::append(char)
void append(char c)
    {
      if (is_full()) { return; }
      queue[tail++] = c;
      if (tail == sizeof(queue)) { tail = 0; }
      count++;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
callq 0xd0e0
testb $0x1, %al
jne 0xcd15
jmp 0xcd17
jmp 0xcd50
movq -0x18(%rbp), %rax
movb -0x9(%rbp), %dl
movl 0x8(%rax), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x8(%rax)
movslq %ecx, %rcx
movb %dl, 0xc(%rax,%rcx)
movslq 0x8(%rax), %rax
cmpq $0x20, %rax
jne 0xcd45
movq -0x18(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TelevisionHttp.h
// Function: TelevisionHttp::KeyQueue::get_next()
char get_next()
    {
      char c = queue[head++];
      if (head == sizeof(queue)) { head = 0; }
      count--;
      return c;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl 0x4(%rax), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, 0x4(%rax)
movslq %ecx, %rcx
movb 0xc(%rax,%rcx), %cl
movb %cl, -0x9(%rbp)
movslq 0x4(%rax), %rax
cmpq $0x20, %rax
jne 0xcdda
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movb -0x9(%rbp), %al
popq %rbp
retq
nopw (%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TelevisionVNC.cxx
// Function: TelevisionVNC::TelevisionVNC()
TelevisionVNC::TelevisionVNC() :
  needs_full_image{true},
  needs_color_table{true},
  image_page{0}
{
  image_packet_length = sizeof(ImagePacket) + (width * height * 4);
  image_packet[0] = (ImagePacket *)malloc(image_packet_length);
  image_packet[1] = (ImagePacket *)malloc(image_packet_length);

  memset(image_packet[0], 0, image_packet_length);
  memset(image_packet[1], 0, image_packet_length);

  image_packet[0]->number_of_rectangles = htons(1);
  image_packet[0]->width = htons(width);
  image_packet[0]->height = htons(height);
  image_packet[0]->encoding_type = htonl(ENCODING_RAW);

  image_packet[1]->number_of_rectangles = htons(1);
  image_packet[1]->width = htons(width);
  image_packet[1]->height = htons(height);
  image_packet[1]->encoding_type = htonl(ENCODING_RAW);

  diff_buffer_length = width * height * 4;
  diff_buffer = (uint8_t *)malloc(diff_buffer_length);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0xbe80
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
callq 0x99a0
jmp 0xd5e8
movq -0x20(%rbp), %rax
leaq 0x76d5(%rip), %rcx      # 0x14cc8
addq $0x10, %rcx
movq %rcx, (%rax)
movb $0x1, 0x2c(%rax)
movb $0x1, 0x2d(%rax)
movl $0x0, 0x48(%rax)
movl 0x8(%rax), %ecx
imull 0xc(%rax), %ecx
shll $0x2, %ecx
movslq %ecx, %rcx
addq $0x10, %rcx
movl %ecx, 0x30(%rax)
movslq 0x30(%rax), %rdi
callq 0x4320
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x38(%rax)
movslq 0x30(%rax), %rdi
callq 0x4320
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x40(%rax)
movq 0x38(%rax), %rdi
movslq 0x30(%rax), %rdx
xorl %esi, %esi
callq 0x4170
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rdi
movslq 0x30(%rax), %rdx
xorl %esi, %esi
callq 0x4170
movl $0x1, %edi
callq 0x4070
movw %ax, %dx
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rcx
movw %dx, 0x2(%rcx)
movl 0x8(%rax), %eax
movzwl %ax, %edi
callq 0x4070
movw %ax, %dx
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rcx
movw %dx, 0x8(%rcx)
movl 0xc(%rax), %eax
movzwl %ax, %edi
callq 0x4070
movw %ax, %cx
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movw %cx, 0xa(%rax)
xorl %edi, %edi
callq 0x41d0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movl %ecx, 0xc(%rax)
movl $0x1, %edi
callq 0x4070
movw %ax, %dx
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rcx
movw %dx, 0x2(%rcx)
movl 0x8(%rax), %eax
movzwl %ax, %edi
callq 0x4070
movw %ax, %dx
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rcx
movw %dx, 0x8(%rcx)
movl 0xc(%rax), %eax
movzwl %ax, %edi
callq 0x4070
movw %ax, %cx
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rax
movw %cx, 0xa(%rax)
xorl %edi, %edi
callq 0x41d0
movl %eax, %edx
movq -0x20(%rbp), %rax
movq 0x40(%rax), %rcx
movl %edx, 0xc(%rcx)
movl 0x8(%rax), %ecx
imull 0xc(%rax), %ecx
shll $0x2, %ecx
movl %ecx, 0x58(%rax)
movslq 0x58(%rax), %rdi
callq 0x4320
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x50(%rax)
addq $0x20, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
callq 0xbed0
movq -0x10(%rbp), %rdi
callq 0x43d0
nop
// File: mikeakohn[P]cloudtari/build/../src/TelevisionVNC.cxx
// Function: TelevisionVNC::init()
int TelevisionVNC::init()
{
  if (net_open(port) != 0) { return -1; }

  if (send_protocol_version() != 0) { return -1; }
  if (get_client_protocol_version() != 0) { return -1; }
  if (send_security() != 0) { return -1; }
  if (get_client_init() != 0) { return -1; }
  if (send_server_init() != 0) { return -1; }
  //if (send_color_table() != 0) { return -1; }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rax, %rdi
addq $0x20, %rdi
movl 0x28(%rax), %esi
callq 0x9a60
cmpl $0x0, %eax
je 0xd841
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd8bb
movq -0x18(%rbp), %rdi
callq 0xd8d0
cmpl $0x0, %eax
je 0xd858
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd8bb
movq -0x18(%rbp), %rdi
callq 0xd940
cmpl $0x0, %eax
je 0xd86f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd8bb
movq -0x18(%rbp), %rdi
callq 0xd9b0
cmpl $0x0, %eax
je 0xd886
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd8bb
movq -0x18(%rbp), %rdi
callq 0xd9f0
cmpl $0x0, %eax
je 0xd89d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd8bb
movq -0x18(%rbp), %rdi
callq 0xda70
cmpl $0x0, %eax
je 0xd8b4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd8bb
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TelevisionVNC.cxx
// Function: TelevisionVNC::send_protocol_version()
int TelevisionVNC::send_protocol_version()
{
  const char *version = "RFB 003.003\n";

  if (net_send((const uint8_t *)version, strlen(version)) != 12)
  {
    printf("Couldn't send 12 bytes\n");
    return -1;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x2c15(%rip), %rcx      # 0x104fc
movq %rcx, -0x18(%rbp)
addq $0x20, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4130
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl %eax, %edx
callq 0x9ba0
cmpl $0xc, %eax
je 0xd92f
leaq 0x2bea(%rip), %rdi      # 0x10509
movb $0x0, %al
callq 0x4050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd936
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: mikeakohn[P]cloudtari/build/../src/TelevisionVNC.cxx
// Function: TelevisionVNC::get_client_protocol_version()
int TelevisionVNC::get_client_protocol_version()
{
  uint8_t version[12];

  if (net_recv(version, sizeof(version)) != 12)
  {
    printf("Error: Client protocol version.\n");
    return -1;
  }

  printf("%s\n", version);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x20, %rdi
leaq -0x1c(%rbp), %rsi
movl $0xc, %edx
movl $0x1, %ecx
callq 0x9d70
cmpl $0xc, %eax
je 0xd983
leaq 0x2bae(%rip), %rdi      # 0x10521
movb $0x0, %al
callq 0x4050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xd99c
leaq -0x1c(%rbp), %rsi
leaq 0x17e3(%rip), %rdi      # 0xf171
movb $0x0, %al
callq 0x4050
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TelevisionVNC.cxx
// Function: TelevisionVNC::get_client_init()
int TelevisionVNC::get_client_init()
{
  uint8_t init[1] = { 0 };

  if (net_recv(init, sizeof(init)) != 1)
  {
    printf("Error: Client init improper response.\n");
    return -1;
  }

  printf("Client init response %d\n", init[0]);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x11(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
callq 0x4170
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
leaq -0x11(%rbp), %rsi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x9d70
cmpl $0x1, %eax
je 0xda48
leaq 0x2b0a(%rip), %rdi      # 0x10542
movb $0x0, %al
callq 0x4050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xda61
movzbl -0x11(%rbp), %esi
leaq 0x2b16(%rip), %rdi      # 0x10569
movb $0x0, %al
callq 0x4050
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TelevisionVNC.cxx
// Function: TelevisionVNC::send_server_init()
int TelevisionVNC::send_server_init()
{
  struct
  {
    uint16_t width;
    uint16_t height;
    uint8_t bits_per_pixel;
    uint8_t depth;
    uint8_t big_endian_flag;
    uint8_t true_colour_flag;
    uint16_t red_max;
    uint16_t green_max;
    uint16_t blue_max;
    uint8_t red_shift;
    uint8_t green_shift;
    uint8_t blue_shift;
    uint8_t padding[3];
    uint32_t name_length;
    char name[8];
  } packet;

  memset(&packet, 0, sizeof(packet));

  packet.width = htons(width);
  packet.height = htons(height);
  packet.bits_per_pixel = 32;
  packet.depth = 32;
  //packet.bits_per_pixel = 8;
  //packet.depth = 8;
  //packet.big_endian_flag = 1;
  packet.true_colour_flag = 1;
  packet.red_max = htons(255);
  packet.green_max = htons(255);
  packet.blue_max = htons(255);
  packet.red_shift = 16;
  packet.green_shift = 8;
  packet.blue_shift = 0;
  packet.name_length = htonl(8);
  memcpy(packet.name, "ATARI---", 8);

  if (sizeof(packet) != 32)
  {
    printf("Error: Size of packet %s:%d\n", __FILE__, __LINE__);
    exit(1);
  }

  if (net_send((const uint8_t *)&packet, sizeof(packet)) != 32)
  {
    printf("Error: Send packet %s:%d\n", __FILE__, __LINE__);
    return -1;
  }

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x4170
movq -0x38(%rbp), %rax
movl 0x8(%rax), %eax
movzwl %ax, %edi
callq 0x4070
movw %ax, %cx
movq -0x38(%rbp), %rax
movw %cx, -0x30(%rbp)
movl 0xc(%rax), %eax
movzwl %ax, %edi
callq 0x4070
movw %ax, -0x2e(%rbp)
movb $0x20, -0x2c(%rbp)
movb $0x20, -0x2b(%rbp)
movb $0x1, -0x29(%rbp)
movl $0xff, %edi
callq 0x4070
movw %ax, -0x28(%rbp)
movl $0xff, %edi
callq 0x4070
movw %ax, -0x26(%rbp)
movl $0xff, %edi
callq 0x4070
movw %ax, -0x24(%rbp)
movb $0x10, -0x22(%rbp)
movb $0x8, -0x21(%rbp)
movb $0x0, -0x20(%rbp)
movl $0x8, %edi
callq 0x41d0
movq -0x38(%rbp), %rdi
movl %eax, -0x1c(%rbp)
movq 0x2a6b(%rip), %rax      # 0x10582
movq %rax, -0x18(%rbp)
addq $0x20, %rdi
leaq -0x30(%rbp), %rsi
movl $0x20, %edx
callq 0x9ba0
cmpl $0x20, %eax
je 0xdb55
leaq 0x2a52(%rip), %rdi      # 0x1058b
leaq 0x2a65(%rip), %rsi      # 0x105a5
movl $0x141, %edx            # imm = 0x141
movb $0x0, %al
callq 0x4050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xdb5c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mikeakohn[P]cloudtari/build/../src/TelevisionVNC.cxx
// Function: TelevisionVNC::refresh()
bool TelevisionVNC::refresh()
{
  pause();

  send_image_diff();

  image_page ^= 1;

  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0xcc40
movq -0x10(%rbp), %rdi
callq 0xdbb0
movq -0x10(%rbp), %rax
movl 0x48(%rax), %ecx
xorl $0x1, %ecx
movl %ecx, 0x48(%rax)
movb $0x1, %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: mikeakohn[P]cloudtari/build/../src/TelevisionVNC.cxx
// Function: TelevisionVNC::print_pixel_format(unsigned char*)
void TelevisionVNC::print_pixel_format(uint8_t *buffer)
{
  buffer += 4;

  printf("  bits_per_pixel: %d\n", buffer[0]);
  printf("           depth: %d\n", buffer[1]);
  printf("      big_endian: %d\n", buffer[2]);
  printf("     true_colour: %d\n", buffer[3]);
  printf("         red_max: %d\n", (buffer[4] << 8) | buffer[5]);
  printf("       green_max: %d\n", (buffer[6] << 8) | buffer[7]);
  printf("        blue_max: %d\n", (buffer[8] << 8) | buffer[9]);
  printf("       red_shift: %d\n", buffer[10]);
  printf("     green_shift: %d\n", buffer[11]);
  printf("      blue_shift: %d\n", buffer[12]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %esi
leaq 0x2204(%rip), %rdi      # 0x105be
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %esi
leaq 0x2204(%rip), %rdi      # 0x105d4
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
movzbl 0x2(%rax), %esi
leaq 0x2204(%rip), %rdi      # 0x105ea
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
movzbl 0x3(%rax), %esi
leaq 0x2204(%rip), %rdi      # 0x10600
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
movzbl 0x4(%rax), %esi
shll $0x8, %esi
movq -0x10(%rbp), %rax
movzbl 0x5(%rax), %eax
orl %eax, %esi
leaq 0x21f7(%rip), %rdi      # 0x10616
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
movzbl 0x6(%rax), %esi
shll $0x8, %esi
movq -0x10(%rbp), %rax
movzbl 0x7(%rax), %eax
orl %eax, %esi
leaq 0x21ea(%rip), %rdi      # 0x1062c
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
movzbl 0x8(%rax), %esi
shll $0x8, %esi
movq -0x10(%rbp), %rax
movzbl 0x9(%rax), %eax
orl %eax, %esi
leaq 0x21dd(%rip), %rdi      # 0x10642
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
movzbl 0xa(%rax), %esi
leaq 0x21dd(%rip), %rdi      # 0x10658
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
movzbl 0xb(%rax), %esi
leaq 0x21dd(%rip), %rdi      # 0x1066e
movb $0x0, %al
callq 0x4050
movq -0x10(%rbp), %rax
movzbl 0xc(%rax), %esi
leaq 0x21dd(%rip), %rdi      # 0x10684
movb $0x0, %al
callq 0x4050
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)