// File: /workspace/github_cpp_makefile_star2_O3/kdungs[P]cpp-prelude/test_prelude.cc
// Function: test_splitAt()
auto test_splitAt() -> void {
  using Prelude::splitAt;
  auto expectL = std::vector<int>{1, 2, 3, 4};
  auto expectR = std::vector<int>{5, 6, 7, 8};
  std::vector<int> resultL, resultR;
  std::tie(resultL, resultR) =
      splitAt(4, std::vector<int>{1, 2, 3, 4, 5, 6, 7, 8});
  assert(resultL == expectL);
  assert(resultR == expectR);
  // empty first half
  expectL = std::vector<int>{};
  expectR = std::vector<int>{1, 2, 3, 4};
  std::tie(resultL, resultR) = splitAt(0, std::vector<int>{1, 2, 3, 4});
  assert(resultL == expectL);
  assert(resultR == expectR);
  // empty second half
  expectL = std::vector<int>{1, 2, 3, 4};
  expectR = std::vector<int>{};
  std::tie(resultL, resultR) = splitAt(10, std::vector<int>{1, 2, 3, 4});
  assert(resultL == expectL);
  assert(resultR == expectR);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movaps 0x58b5(%rip), %xmm0     # 0xa010
leaq 0x10(%rsp), %rbx
movaps %xmm0, (%rbx)
leaq 0x70(%rsp), %rdi
leaq 0x90(%rsp), %rcx
movl $0x4, %edx
movq %rbx, %rsi
callq 0x6c08
movaps 0x58cc(%rip), %xmm0     # 0xa050
movaps %xmm0, (%rbx)
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x90(%rsp), %rcx
movl $0x4, %edx
callq 0x6c08
movups 0x6402(%rip), %xmm0     # 0xabac
leaq 0x90(%rsp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0x63df(%rip), %xmm0     # 0xab9c
movaps %xmm0, (%rsi)
leaq 0xb0(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movl $0x8, %edx
callq 0x6c08
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
movl $0x4, %esi
callq 0x6e7e
movq 0x28(%rsp), %r15
movq 0x30(%rsp), %rbp
movq 0x38(%rsp), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rsp)
xorl %eax, %eax
movq %rax, 0x38(%rsp)
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %r14
movq 0x20(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rax, 0x20(%rsp)
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x4847
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %rbp, %rdx
subq %r15, %rdx
movq 0x70(%rsp), %rbx
movq 0x78(%rsp), %rax
subq %rbx, %rax
cmpq %rax, %rdx
jne 0x4d2d
cmpq %r15, %rbp
je 0x487b
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2100
testl %eax, %eax
jne 0x4d2d
movq %r14, %rdx
subq %r13, %rdx
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rax
subq %rsi, %rax
cmpq %rax, %rdx
jne 0x4d4c
cmpq %r13, %r14
je 0x48ac
movq %r13, %rdi
callq 0x2100
testl %eax, %eax
jne 0x4d4c
movq 0x80(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movq $0x0, 0x80(%rsp)
testq %rbx, %rbx
je 0x48d8
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x20f0
leaq 0x90(%rsp), %rsi
movaps 0x5729(%rip), %xmm0     # 0xa010
movaps %xmm0, (%rsi)
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rcx
movl $0x4, %edx
callq 0x6c08
movq 0x50(%rsp), %rdi
movq 0x60(%rsp), %rsi
movaps 0x10(%rsp), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x60(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x4954
subq %rdi, %rsi
callq 0x20f0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4954
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
leaq 0xb0(%rsp), %rsi
movaps 0x56ad(%rip), %xmm0     # 0xa010
movaps %xmm0, (%rsi)
leaq 0x90(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movl $0x4, %edx
callq 0x6c08
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rdx
xorl %esi, %esi
callq 0x6e7e
movq 0x28(%rsp), %r14
movq 0x30(%rsp), %rbp
movq 0x38(%rsp), %rax
movq %rax, 0x88(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
testq %r15, %r15
je 0x49cf
subq %r15, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
xorps %xmm0, %xmm0
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %rbx
movq 0x20(%rsp), %r15
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %r13, %r13
je 0x4a01
movq 0x48(%rsp), %rsi
subq %r13, %rsi
movq %r13, %rdi
callq 0x20f0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4a18
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4a2f
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4a4c
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %rbp, %rdx
subq %r14, %rdx
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rax
subq %rsi, %rax
cmpq %rax, %rdx
jne 0x4d6b
cmpq %r14, %rbp
je 0x4a7d
movq %r14, %rdi
callq 0x2100
testl %eax, %eax
jne 0x4d6b
movq %rbx, %rdx
subq %r12, %rdx
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rax
subq %rsi, %rax
cmpq %rax, %rdx
jne 0x4d8a
cmpq %r12, %rbx
je 0x4aae
movq %r12, %rdi
callq 0x2100
testl %eax, %eax
jne 0x4d8a
leaq 0x90(%rsp), %rsi
movaps 0x5553(%rip), %xmm0     # 0xa010
movaps %xmm0, (%rsi)
leaq 0x10(%rsp), %rdi
leaq 0xb0(%rsp), %rcx
movl $0x4, %edx
callq 0x6c08
movq 0x70(%rsp), %rdi
movq 0x80(%rsp), %rsi
movaps 0x10(%rsp), %xmm0
movaps %xmm0, 0x70(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x80(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x4b30
subq %rdi, %rsi
callq 0x20f0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4b30
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq 0x50(%rsp), %rdi
movq 0x60(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
testq %rdi, %rdi
je 0x4b58
subq %rdi, %rsi
callq 0x20f0
leaq 0xb0(%rsp), %rsi
movaps 0x54a9(%rip), %xmm0     # 0xa010
movaps %xmm0, (%rsi)
leaq 0x90(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movl $0x4, %edx
callq 0x6c08
leaq 0x10(%rsp), %rdi
leaq 0x90(%rsp), %rdx
movl $0xa, %esi
callq 0x6e7e
movq 0x28(%rsp), %r13
movq 0x30(%rsp), %rbp
movq 0x38(%rsp), %rax
movq %rax, 0x48(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rsp)
movq $0x0, 0x38(%rsp)
testq %r14, %r14
je 0x4bd8
movq 0x88(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x20f0
xorps %xmm0, %xmm0
movq 0x10(%rsp), %rbx
movq 0x18(%rsp), %r14
movq 0x20(%rsp), %rax
movq %rax, 0x88(%rsp)
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %r12, %r12
je 0x4c10
subq %r12, %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x20f0
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4c27
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4c3e
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4c5b
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %rbp, %rdx
subq %r13, %rdx
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rax
subq %rsi, %rax
cmpq %rax, %rdx
jne 0x4da9
cmpq %r13, %rbp
je 0x4c8c
movq %r13, %rdi
callq 0x2100
testl %eax, %eax
jne 0x4da9
movq %r14, %rdx
subq %rbx, %rdx
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rax
subq %rsi, %rax
cmpq %rax, %rdx
jne 0x4dc8
cmpq %rbx, %r14
je 0x4cbd
movq %rbx, %rdi
callq 0x2100
testl %eax, %eax
jne 0x4dc8
testq %rbx, %rbx
je 0x4cd5
movq 0x88(%rsp), %rsi
subq %rbx, %rsi
movq %rbx, %rdi
callq 0x20f0
testq %r13, %r13
je 0x4cea
movq 0x48(%rsp), %rsi
subq %r13, %rsi
movq %r13, %rdi
callq 0x20f0
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x4d01
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x4d1b
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5806(%rip), %rdi      # 0xa53a
leaq 0x5334(%rip), %rsi      # 0xa06f
leaq 0x580b(%rip), %rcx      # 0xa54d
movl $0xe2, %edx
callq 0x2090
leaq 0x580e(%rip), %rdi      # 0xa561
leaq 0x5315(%rip), %rsi      # 0xa06f
leaq 0x57ec(%rip), %rcx      # 0xa54d
movl $0xe3, %edx
callq 0x2090
leaq 0x57c8(%rip), %rdi      # 0xa53a
leaq 0x52f6(%rip), %rsi      # 0xa06f
leaq 0x57cd(%rip), %rcx      # 0xa54d
movl $0xe8, %edx
callq 0x2090
leaq 0x57d0(%rip), %rdi      # 0xa561
leaq 0x52d7(%rip), %rsi      # 0xa06f
leaq 0x57ae(%rip), %rcx      # 0xa54d
movl $0xe9, %edx
callq 0x2090
leaq 0x578a(%rip), %rdi      # 0xa53a
leaq 0x52b8(%rip), %rsi      # 0xa06f
leaq 0x578f(%rip), %rcx      # 0xa54d
movl $0xee, %edx
callq 0x2090
leaq 0x5792(%rip), %rdi      # 0xa561
leaq 0x5299(%rip), %rsi      # 0xa06f
leaq 0x5770(%rip), %rcx      # 0xa54d
movl $0xef, %edx
callq 0x2090
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4e0e
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
jmp 0x4e0e
jmp 0x4e0b
movq %rax, %rbx
movq %r12, %r13
movq %r15, 0x48(%rsp)
movq %r14, %r15
movq 0x88(%rsp), %r12
jmp 0x4e4a
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x4e4a
movq 0xa0(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
jmp 0x4e4a
jmp 0x4e47
movq %rax, %rbx
testq %r13, %r13
je 0x4e5f
movq 0x48(%rsp), %rsi
subq %r13, %rsi
movq %r13, %rdi
callq 0x20f0
testq %r15, %r15
je 0x4e94
subq %r15, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
jmp 0x4e94
movq %rax, %rbx
movq 0xb0(%rsp), %rdi
testq %rdi, %rdi
je 0x4e94
movq 0xc0(%rsp), %rsi
subq %rdi, %rsi
jmp 0x4e6d
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x4eb0
movq 0x60(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
jmp 0x4eb0
movq %rax, %rbx
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x4eca
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x20f0
movq %rbx, %rdi
callq 0x2170