// File: /workspace/github_cpp_makefile_star2_O3/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 0x4760(%rip), %rsi      # 0xa5f9
leaq 0x475c(%rip), %rdx      # 0xa5fc
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x8dd8
leaq 0x70(%rsp), %r14
leaq 0x80(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4799(%rip), %rdx      # 0xa65e
movq %r14, %rdi
movq %rdx, %rsi
callq 0x8dd8
leaq 0x90(%rsp), %r14
leaq 0xa0(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x4712(%rip), %rsi      # 0xa5fd
leaq 0x4710(%rip), %rdx      # 0xa602
movq %r14, %rdi
callq 0x8dd8
leaq 0xb0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x10(%rsp), %rcx
movl $0x3, %edx
callq 0x7186
movq $-0x60, %rbx
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x5f31
movq (%r15), %rsi
incq %rsi
callq 0x20f0
addq $-0x20, %r15
addq $0x20, %rbx
jne 0x5f1d
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 0x6c08
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 0x7006
leaq 0x4a(%rsp), %rsi
movw $0x6261, (%rsi)         # imm = 0x6261
movb $0x63, 0x2(%rsi)
leaq 0xc8(%rsp), %r14
leaq 0xd(%rsp), %rcx
movl $0x3, %edx
movq %r14, %rdi
callq 0x71ce
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x30(%rsp), %rbp
movq 0xe0(%rsp), %r13
movq 0xc8(%rsp), %r15
cmpq 0x38(%rsp), %rbp
setne %al
cmpq %rbx, %r13
setne %cl
andb %al, %cl
cmpq %r14, %r15
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x60a1
addq $0x4, %rbp
leaq 0x50(%rsp), %r12
cmpb $0x1, 0x10(%r13)
jne 0x602e
movsbl 0x10(%r15), %edx
movslq -0x4(%rbp), %rsi
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r12, %rdi
callq 0x2120
jmp 0x6046
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
movq $0x0, 0x58(%rsp)
movb $0x0, 0x60(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x9096
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x606f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x20f0
movq (%r13), %r13
movq (%r15), %r15
cmpq %rbx, %r13
setne %cl
cmpq %r14, %r15
setne %al
cmpq 0x38(%rsp), %rbp
je 0x6099
testb %cl, %cl
je 0x6099
addq $0x4, %rbp
testb %al, %al
jne 0x600a
movq 0xc8(%rsp), %r15
cmpq %r14, %r15
je 0x60be
movq (%r15), %r12
movl $0x18, %esi
movq %r15, %rdi
callq 0x20f0
movq %r12, %r15
cmpq %r14, %r12
jne 0x60a6
movq 0xe0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x60e0
movq (%rdi), %r14
movl $0x18, %esi
callq 0x20f0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x60cb
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x60f7
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 0x6151
callq 0x92ea
testb %al, %al
je 0x6151
leaq 0x10(%rsp), %rdi
callq 0x721c
leaq 0xb0(%rsp), %rdi
callq 0x721c
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3f48(%rip), %rdi      # 0xa0a0
leaq 0x3f10(%rip), %rsi      # 0xa06f
leaq 0x449d(%rip), %rcx      # 0xa603
movl $0x13d, %edx            # imm = 0x13D
callq 0x2090
movq %rax, %r15
jmp 0x622c
movq %rax, %r15
jmp 0x624e
movq %rax, %r15
jmp 0x6265
movq %rax, %r15
leaq 0xb0(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x225f
jmp 0x6272
jmp 0x61a4
movq %rax, %r15
addq $-0x10, %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x61bf
movq (%r14), %rsi
incq %rsi
callq 0x20f0
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %rbx, %r14
movq %rax, %r14
jne 0x61ab
jmp 0x6272
movq %rax, %r15
jmp 0x6272
movq %rax, %r15
jmp 0x6200
movq %rax, %r15
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x6200
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x20f0
leaq 0x10(%rsp), %rdi
callq 0x721c
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x622c
movq (%rdi), %r12
movl $0x18, %esi
callq 0x20f0
movq %r12, %rdi
cmpq %r14, %r12
jne 0x6217
movq 0xe0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x624e
movq (%rdi), %r14
movl $0x18, %esi
callq 0x20f0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x6239
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x6265
movq 0x40(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
leaq 0xb0(%rsp), %rdi
callq 0x721c
movq %r15, %rdi
callq 0x2170