// File: kdungs[P]cpp-prelude/test_prelude.cc
// Function: test_unzip()
auto test_unzip() -> void {
  using Prelude::unzip;
  auto expectL = std::vector<int>{1, 2, 3};
  auto expectR = std::vector<bool>{true, false, true};
  std::vector<int> resultL;
  std::vector<bool> resultR;
  std::tie(resultL, resultR) = unzip(std::vector<std::tuple<int, bool>>{
      std::make_tuple(1, true), std::make_tuple(2, false),
      std::make_tuple(3, true)});
  assert(resultL == expectL);
  assert(resultR == expectR);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movl $0x1, -0x34(%rbp)
movl $0x2, -0x30(%rbp)
movl $0x3, -0x2c(%rbp)
leaq -0x34(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x3, -0x20(%rbp)
leaq -0x35(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0xa900
movq -0x178(%rbp), %rcx
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0xa920
jmp 0x813a
leaq -0x35(%rbp), %rdi
callq 0xaa00
movb $0x1, -0x83(%rbp)
movb $0x0, -0x82(%rbp)
movb $0x1, -0x81(%rbp)
leaq -0x83(%rbp), %rax
movq %rax, -0x80(%rbp)
movq $0x3, -0x78(%rbp)
leaq -0x84(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0xa840
movq -0x180(%rbp), %rcx
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x70(%rbp), %rdi
callq 0xa860
jmp 0x8198
leaq -0x84(%rbp), %rdi
callq 0xa8e0
leaq -0xa0(%rbp), %rdi
callq 0xaf60
leaq -0xc8(%rbp), %rdi
callq 0xc3d0
movl $0x1, -0x14c(%rbp)
movb $0x1, -0x14d(%rbp)
leaq -0x148(%rbp), %rdi
leaq -0x14c(%rbp), %rsi
leaq -0x14d(%rbp), %rdx
callq 0xb850
jmp 0x81e9
leaq -0x140(%rbp), %rdi
movl $0x2, -0x154(%rbp)
movb $0x0, -0x155(%rbp)
leaq -0x154(%rbp), %rsi
leaq -0x155(%rbp), %rdx
callq 0xb850
jmp 0x8216
leaq -0x138(%rbp), %rdi
movl $0x3, -0x15c(%rbp)
movb $0x1, -0x15d(%rbp)
leaq -0x15c(%rbp), %rsi
leaq -0x15d(%rbp), %rdx
callq 0xb850
jmp 0x8243
leaq -0x148(%rbp), %rax
movq %rax, -0x130(%rbp)
movq $0x3, -0x128(%rbp)
leaq -0x15e(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0xb890
movq -0x188(%rbp), %rcx
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq -0x120(%rbp), %rdi
callq 0xb8b0
jmp 0x8292
leaq -0x108(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0xc3f0
jmp 0x82a7
leaq -0x170(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
leaq -0xa0(%rbp), %rsi
movq %rsi, -0x198(%rbp)
leaq -0xc8(%rbp), %rdx
callq 0xc530
movq -0x1a8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
movq %rsi, -0x1a0(%rbp)
callq 0xc570
movq -0x1a0(%rbp), %rdi
callq 0xc5b0
leaq -0x120(%rbp), %rdi
callq 0xbbe0
leaq -0x15e(%rbp), %rdi
callq 0xb930
movq -0x198(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xabe0
movb %al, -0x189(%rbp)
jmp 0x8325
movb -0x189(%rbp), %al
testb $0x1, %al
jne 0x8331
jmp 0x8336
jmp 0x83d1
leaq 0x16461(%rip), %rdi     # 0x1e79e
leaq 0x15f37(%rip), %rsi     # 0x1e27b
movl $0x149, %edx            # imm = 0x149
leaq 0x1652c(%rip), %rcx     # 0x1e87c
callq 0x2110
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x35(%rbp), %rdi
callq 0xaa00
jmp 0x8473
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x84(%rbp), %rdi
callq 0xa8e0
jmp 0x846a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x8449
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x83c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x120(%rbp), %rdi
callq 0xbbe0
leaq -0x15e(%rbp), %rdi
callq 0xb930
jmp 0x8449
leaq -0xc8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0xaa20
movb %al, -0x1a9(%rbp)
jmp 0x83e9
movb -0x1a9(%rbp), %al
testb $0x1, %al
jne 0x83f5
jmp 0x83f7
jmp 0x8416
leaq 0x163c7(%rip), %rdi     # 0x1e7c5
leaq 0x15e76(%rip), %rsi     # 0x1e27b
movl $0x14a, %edx            # imm = 0x14A
leaq 0x1646b(%rip), %rcx     # 0x1e87c
callq 0x2110
leaq -0xc8(%rbp), %rdi
callq 0xaae0
leaq -0xa0(%rbp), %rdi
callq 0xa9a0
leaq -0x70(%rbp), %rdi
callq 0xaae0
leaq -0x18(%rbp), %rdi
callq 0xa9a0
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
leaq -0xc8(%rbp), %rdi
callq 0xaae0
leaq -0xa0(%rbp), %rdi
callq 0xa9a0
leaq -0x70(%rbp), %rdi
callq 0xaae0
leaq -0x18(%rbp), %rdi
callq 0xa9a0
movq -0x40(%rbp), %rdi
callq 0x22b0
nopl (%rax)