// File: eschwabe[P]interview-practice/src/libds_list.cpp
// Function: main
int main()
{
  List l;
  l.AppendTail(10);
  l.AppendHead(1);
  l.AppendHead(2);
  l.AppendTail(12);
  l.AppendHead(3);
  l.AppendTail(11);
  l.AppendHead(4);
  l.AppendTail(13);
  std::cout << l.RemoveHead() << std::endl;
  std::cout << l.RemoveTail() << std::endl;
  std::cout << l.RemoveHead() << std::endl;
  std::cout << l.RemoveTail() << std::endl;
  std::cout << l.RemoveHead() << std::endl;
  std::cout << l.RemoveTail() << std::endl;
  std::cout << l.RemoveHead() << std::endl;
  std::cout << l.RemoveTail() << std::endl;
  std::cout << l.RemoveHead() << std::endl;
  std::cout << l.RemoveTail() << std::endl;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x18(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0x1210
movq -0x50(%rbp), %rdi
movl $0xa, -0x1c(%rbp)
leaq -0x1c(%rbp), %rsi
callq 0x1340
jmp 0x15b5
movl $0x1, -0x30(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1260
jmp 0x15cb
movl $0x2, -0x34(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x1260
jmp 0x15e1
movl $0xc, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x1340
jmp 0x15f7
movl $0x3, -0x3c(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
callq 0x1260
jmp 0x160d
movl $0xb, -0x40(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1340
jmp 0x1623
movl $0x4, -0x44(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x44(%rbp), %rsi
callq 0x1260
jmp 0x1639
movl $0xd, -0x48(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1340
jmp 0x164f
leaq -0x18(%rbp), %rdi
callq 0x1440
movl %eax, %esi
movq 0x2977(%rip), %rdi      # 0x3fd8
callq 0x10b0
movq %rax, -0x58(%rbp)
jmp 0x166c
movq -0x58(%rbp), %rdi
movq 0x2951(%rip), %rsi      # 0x3fc8
callq 0x1090
jmp 0x167e
leaq -0x18(%rbp), %rdi
callq 0x14a0
movl %eax, %esi
movq 0x2948(%rip), %rdi      # 0x3fd8
callq 0x10b0
movq %rax, -0x60(%rbp)
jmp 0x169b
movq -0x60(%rbp), %rdi
movq 0x2922(%rip), %rsi      # 0x3fc8
callq 0x1090
jmp 0x16ad
leaq -0x18(%rbp), %rdi
callq 0x1440
movl %eax, %esi
movq 0x2919(%rip), %rdi      # 0x3fd8
callq 0x10b0
movq %rax, -0x68(%rbp)
jmp 0x16ca
movq -0x68(%rbp), %rdi
movq 0x28f3(%rip), %rsi      # 0x3fc8
callq 0x1090
jmp 0x16dc
leaq -0x18(%rbp), %rdi
callq 0x14a0
movl %eax, %esi
movq 0x28ea(%rip), %rdi      # 0x3fd8
callq 0x10b0
movq %rax, -0x70(%rbp)
jmp 0x16f9
movq -0x70(%rbp), %rdi
movq 0x28c4(%rip), %rsi      # 0x3fc8
callq 0x1090
jmp 0x170b
leaq -0x18(%rbp), %rdi
callq 0x1440
movl %eax, %esi
movq 0x28bb(%rip), %rdi      # 0x3fd8
callq 0x10b0
movq %rax, -0x78(%rbp)
jmp 0x1728
movq -0x78(%rbp), %rdi
movq 0x2895(%rip), %rsi      # 0x3fc8
callq 0x1090
jmp 0x173a
leaq -0x18(%rbp), %rdi
callq 0x14a0
movl %eax, %esi
movq 0x288c(%rip), %rdi      # 0x3fd8
callq 0x10b0
movq %rax, -0x80(%rbp)
jmp 0x1757
movq -0x80(%rbp), %rdi
movq 0x2866(%rip), %rsi      # 0x3fc8
callq 0x1090
jmp 0x1769
leaq -0x18(%rbp), %rdi
callq 0x1440
movl %eax, %esi
movq 0x285d(%rip), %rdi      # 0x3fd8
callq 0x10b0
movq %rax, -0x88(%rbp)
jmp 0x1789
movq -0x88(%rbp), %rdi
movq 0x2831(%rip), %rsi      # 0x3fc8
callq 0x1090
jmp 0x179e
leaq -0x18(%rbp), %rdi
callq 0x14a0
movl %eax, %esi
movq 0x2828(%rip), %rdi      # 0x3fd8
callq 0x10b0
movq %rax, -0x90(%rbp)
jmp 0x17be
movq -0x90(%rbp), %rdi
movq 0x27fc(%rip), %rsi      # 0x3fc8
callq 0x1090
jmp 0x17d3
leaq -0x18(%rbp), %rdi
callq 0x1440
movl %eax, %esi
movq 0x27f3(%rip), %rdi      # 0x3fd8
callq 0x10b0
movq %rax, -0x98(%rbp)
jmp 0x17f3
movq -0x98(%rbp), %rdi
movq 0x27c7(%rip), %rsi      # 0x3fc8
callq 0x1090
jmp 0x1808
leaq -0x18(%rbp), %rdi
callq 0x14a0
movl %eax, %esi
movq 0x27be(%rip), %rdi      # 0x3fd8
callq 0x10b0
movq %rax, -0xa0(%rbp)
jmp 0x1828
movq -0xa0(%rbp), %rdi
movq 0x2792(%rip), %rsi      # 0x3fc8
callq 0x1090
jmp 0x183d
movl $0x0, -0x4(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x1240
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x1240
movq -0x28(%rbp), %rdi
callq 0x10c0
nopw (%rax,%rax)