// File: kdungs[P]cpp-prelude/test_prelude.cc
// Function: test_drop()
auto test_drop() -> void {
  using Prelude::drop;
  auto expect = std::vector<int>{5, 6, 7, 8};
  auto result = drop(4, std::vector<int>{1, 2, 3, 4, 5, 6, 7, 8});
  assert(result == expect);
  // also check case for n > size
  result = drop(100, std::vector<int>{1, 2, 3, 4});
  expect = std::vector<int>{};
  assert(result == expect && "Also has to work for n > size!");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movl $0x5, -0x38(%rbp)
movl $0x6, -0x34(%rbp)
movl $0x7, -0x30(%rbp)
movl $0x8, -0x2c(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x4, -0x20(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0xa900
movq -0x138(%rbp), %rcx
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0xa920
jmp 0x54e1
leaq -0x39(%rbp), %rdi
callq 0xaa00
movups 0x18c53(%rip), %xmm0    # 0x1e144
movaps %xmm0, -0xa0(%rbp)
movups 0x18c35(%rip), %xmm0    # 0x1e134
movaps %xmm0, -0xb0(%rbp)
leaq -0xb0(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x8, -0x88(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x140(%rbp)
callq 0xa900
movq -0x140(%rbp), %rcx
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0xa920
jmp 0x5552
leaq -0x68(%rbp), %rdi
movl $0x4, %esi
leaq -0x80(%rbp), %rdx
callq 0xb630
jmp 0x5566
leaq -0x80(%rbp), %rdi
callq 0xa9a0
leaq -0xb1(%rbp), %rdi
callq 0xaa00
leaq -0x68(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xabe0
movb %al, -0x141(%rbp)
jmp 0x5590
movb -0x141(%rbp), %al
testb $0x1, %al
jne 0x559c
jmp 0x559e
jmp 0x561c
leaq 0x18d07(%rip), %rdi     # 0x1e2ac
leaq 0x18ccf(%rip), %rsi     # 0x1e27b
movl $0xd4, %edx
leaq 0x191d5(%rip), %rcx     # 0x1e78d
callq 0x2110
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x39(%rbp), %rdi
callq 0xaa00
jmp 0x5802
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x55fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xa9a0
leaq -0xb1(%rbp), %rdi
callq 0xaa00
jmp 0x57f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x57f0
movl $0x1, -0x108(%rbp)
movl $0x2, -0x104(%rbp)
movl $0x3, -0x100(%rbp)
movl $0x4, -0xfc(%rbp)
leaq -0x108(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq $0x4, -0xf0(%rbp)
leaq -0x109(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0xa900
movq -0x150(%rbp), %rcx
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
leaq -0xe8(%rbp), %rdi
callq 0xa920
jmp 0x5693
leaq -0xd0(%rbp), %rdi
movl $0x64, %esi
leaq -0xe8(%rbp), %rdx
callq 0xb630
jmp 0x56ad
leaq -0x68(%rbp), %rdi
movq %rdi, -0x168(%rbp)
leaq -0xd0(%rbp), %rsi
movq %rsi, -0x178(%rbp)
callq 0xb600
movq -0x178(%rbp), %rdi
callq 0xa9a0
leaq -0xe8(%rbp), %rdi
callq 0xa9a0
leaq -0x109(%rbp), %rdi
callq 0xaa00
xorps %xmm0, %xmm0
movaps %xmm0, -0x130(%rbp)
movq $0x0, -0x120(%rbp)
leaq -0x130(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0xaf60
movq -0x170(%rbp), %rsi
leaq -0x18(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0xb600
movq -0x170(%rbp), %rdi
callq 0xa9a0
movq -0x168(%rbp), %rdi
movq -0x160(%rbp), %rsi
callq 0xabe0
movb %al, -0x151(%rbp)
jmp 0x5755
movb -0x151(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x179(%rbp)
jne 0x576a
jmp 0x5774
movb $0x1, %al
movb %al, -0x179(%rbp)
jmp 0x5774
movb -0x179(%rbp), %al
testb $0x1, %al
jne 0x5780
jmp 0x5782
jmp 0x57d5
leaq 0x18fcf(%rip), %rdi     # 0x1e758
leaq 0x18aeb(%rip), %rsi     # 0x1e27b
movl $0xd8, %edx
leaq 0x18ff1(%rip), %rcx     # 0x1e78d
callq 0x2110
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x57c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0xa9a0
leaq -0x109(%rbp), %rdi
callq 0xaa00
jmp 0x57f0
leaq -0x68(%rbp), %rdi
callq 0xa9a0
leaq -0x18(%rbp), %rdi
callq 0xa9a0
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
leaq -0x68(%rbp), %rdi
callq 0xa9a0
leaq -0x18(%rbp), %rdi
callq 0xa9a0
movq -0x48(%rbp), %rdi
callq 0x22b0
nopl (%rax,%rax)