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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x442c(%rip), %rsi      # 0xa5f9
leaq 0x4428(%rip), %rdx      # 0xa5fc
leaq 0x50(%rsp), %r15
movq %r15, %rdi
callq 0x92fa
leaq 0x70(%rsp), %rbx
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4465(%rip), %rdx      # 0xa65e
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x92fa
leaq 0x90(%rsp), %rbx
leaq 0xa0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x43de(%rip), %rsi      # 0xa5fd
leaq 0x43dc(%rip), %rdx      # 0xa602
movq %rbx, %rdi
callq 0x92fa
leaq 0xb0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x10(%rsp), %rcx
movl $0x3, %edx
callq 0x75ee
movq $-0x60, %rbx
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x6265
movq (%r14), %rsi
incq %rsi
callq 0x20f0
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x6251
movabsq $0x400000003, %rax      # imm = 0x400000003
leaq 0xfc(%rsp), %rsi
movq %rax, (%rsi)
movl $0x5, 0x8(%rsi)
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movl $0x3, %edx
callq 0x7016
leaq 0x4d(%rsp), %rsi
movw $0x1, (%rsi)
movb $0x1, 0x2(%rsi)
leaq 0xe0(%rsp), %rbx
leaq 0xe(%rsp), %rcx
movl $0x3, %edx
movq %rbx, %rdi
callq 0x746e
leaq 0x4a(%rsp), %rsi
movw $0x6261, (%rsi)         # imm = 0x6261
movb $0x63, 0x2(%rsi)
leaq 0xc8(%rsp), %r15
leaq 0xd(%rsp), %rcx
movl $0x3, %edx
movq %r15, %rdi
callq 0x7636
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x30(%rsp), %rbp
movq 0xe0(%rsp), %r13
movq 0xc8(%rsp), %r12
cmpq 0x38(%rsp), %rbp
setne %al
cmpq %rbx, %r13
setne %cl
andb %al, %cl
cmpq %r15, %r12
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x63cf
addq $0x4, %rbp
leaq 0x50(%rsp), %r14
cmpb $0x1, 0x10(%r13)
jne 0x6363
movsbl 0x10(%r12), %edx
movslq -0x4(%rbp), %rsi
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r14, %rdi
callq 0x2120
jmp 0x637b
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq $0x0, 0x58(%rsp)
movb $0x0, 0x60(%rsp)
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x95ac
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x63a4
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x20f0
movq (%r13), %r13
movq (%r12), %r12
cmpq %rbx, %r13
setne %cl
cmpq %r15, %r12
setne %al
cmpq 0x38(%rsp), %rbp
je 0x63cf
testb %cl, %cl
je 0x63cf
addq $0x4, %rbp
testb %al, %al
jne 0x633e
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x63f1
movq (%rdi), %r14
movl $0x18, %esi
callq 0x20f0
movq %r14, %rdi
cmpq %r15, %r14
jne 0x63dc
movq 0xe0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6413
movq (%rdi), %r14
movl $0x18, %esi
callq 0x20f0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x63fe
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x642a
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq %rsi, %rax
subq %rdi, %rax
movq 0xb0(%rsp), %rdx
movq 0xb8(%rsp), %rcx
subq %rdx, %rcx
cmpq %rcx, %rax
jne 0x6484
callq 0x97f8
testb %al, %al
je 0x6484
leaq 0x10(%rsp), %rdi
callq 0x7684
leaq 0xb0(%rsp), %rdi
callq 0x7684
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3c15(%rip), %rdi      # 0xa0a0
leaq 0x3bdd(%rip), %rsi      # 0xa06f
leaq 0x416a(%rip), %rcx      # 0xa603
movl $0x13d, %edx            # imm = 0x13D
callq 0x2090
movq %rax, %r14
jmp 0x6575
movq %rax, %r14
jmp 0x6597
movq %rax, %r14
jmp 0x65ae
movq %rax, %r14
leaq 0xb0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x2325
movb $0x1, %al
jmp 0x64e5
jmp 0x64d6
movq %rax, %r14
xorl %eax, %eax
jmp 0x64e5
movq %rax, %r14
xorl %eax, %eax
movq %r15, %rbx
cmpq %rbx, %r15
sete %cl
orb %al, %cl
jne 0x65bb
addq $-0x10, %rbx
leaq 0x50(%rsp), %r15
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x6510
movq (%rbx), %rsi
incq %rsi
callq 0x20f0
leaq -0x20(%rbx), %rax
addq $-0x10, %rbx
cmpq %r15, %rbx
movq %rax, %rbx
jne 0x64fc
jmp 0x65bb
movq %rax, %r14
jmp 0x6549
movq %rax, %r14
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x6549
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x20f0
leaq 0x10(%rsp), %rdi
callq 0x7684
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6575
movq (%rdi), %r12
movl $0x18, %esi
callq 0x20f0
movq %r12, %rdi
cmpq %r15, %r12
jne 0x6560
movq 0xe0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x6597
movq (%rdi), %r15
movl $0x18, %esi
callq 0x20f0
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x6582
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x65ae
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
leaq 0xb0(%rsp), %rdi
callq 0x7684
movq %r14, %rdi
callq 0x2170