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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x220, %rsp            # imm = 0x220
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, -0x1e0(%rbp)
callq 0xa900
movq -0x1e0(%rbp), %rcx
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x18(%rbp), %rdi
callq 0xa920
jmp 0x84da
leaq -0x35(%rbp), %rdi
callq 0xaa00
movb $0x61, -0x73(%rbp)
movb $0x62, -0x72(%rbp)
movb $0x63, -0x71(%rbp)
leaq -0x73(%rbp), %rax
movq %rax, -0x70(%rbp)
movq $0x3, -0x68(%rbp)
leaq -0x74(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x22c0
movq -0x1e8(%rbp), %rcx
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0xbef0
jmp 0x8529
leaq -0x74(%rbp), %rdi
callq 0x21e0
movb $0x1, -0xb3(%rbp)
movb $0x0, -0xb2(%rbp)
movb $0x1, -0xb1(%rbp)
leaq -0xb3(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq $0x3, -0xa8(%rbp)
leaq -0xb4(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0xa840
movq -0x1f0(%rbp), %rcx
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
callq 0xa860
jmp 0x8596
leaq -0xb4(%rbp), %rdi
callq 0xa8e0
leaq -0xd0(%rbp), %rdi
callq 0xaf60
leaq -0xe8(%rbp), %rdi
callq 0xc5d0
leaq -0x110(%rbp), %rdi
callq 0xc3d0
movl $0x1, -0x1ac(%rbp)
movb $0x61, -0x1ad(%rbp)
movb $0x1, -0x1ae(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x1ac(%rbp), %rsi
leaq -0x1ad(%rbp), %rdx
leaq -0x1ae(%rbp), %rcx
callq 0xc790
jmp 0x8601
leaq -0x1a0(%rbp), %rdi
movl $0x2, -0x1b4(%rbp)
movb $0x62, -0x1b5(%rbp)
movb $0x0, -0x1b6(%rbp)
leaq -0x1b4(%rbp), %rsi
leaq -0x1b5(%rbp), %rdx
leaq -0x1b6(%rbp), %rcx
callq 0xc790
jmp 0x863c
leaq -0x198(%rbp), %rdi
movl $0x3, -0x1bc(%rbp)
movb $0x63, -0x1bd(%rbp)
movb $0x1, -0x1be(%rbp)
leaq -0x1bc(%rbp), %rsi
leaq -0x1bd(%rbp), %rdx
leaq -0x1be(%rbp), %rcx
callq 0xc790
jmp 0x8677
leaq -0x1a8(%rbp), %rax
movq %rax, -0x190(%rbp)
movq $0x3, -0x188(%rbp)
leaq -0x1bf(%rbp), %rdi
movq %rdi, -0x1f8(%rbp)
callq 0xc7d0
movq -0x1f8(%rbp), %rcx
movq -0x190(%rbp), %rsi
movq -0x188(%rbp), %rdx
leaq -0x180(%rbp), %rdi
callq 0xc7f0
jmp 0x86c6
leaq -0x168(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0xc5f0
jmp 0x86db
leaq -0x1d8(%rbp), %rdi
movq %rdi, -0x218(%rbp)
leaq -0xd0(%rbp), %rsi
movq %rsi, -0x208(%rbp)
leaq -0xe8(%rbp), %rdx
leaq -0x110(%rbp), %rcx
callq 0xc870
movq -0x218(%rbp), %rdi
leaq -0x168(%rbp), %rsi
movq %rsi, -0x210(%rbp)
callq 0xc8b0
movq -0x210(%rbp), %rdi
callq 0xc8f0
leaq -0x180(%rbp), %rdi
callq 0xc910
leaq -0x1bf(%rbp), %rdi
callq 0xc970
movq -0x208(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xabe0
movb %al, -0x1f9(%rbp)
jmp 0x8760
movb -0x1f9(%rbp), %al
testb $0x1, %al
jne 0x876c
jmp 0x8771
jmp 0x8829
leaq 0x16026(%rip), %rdi     # 0x1e79e
leaq 0x15afc(%rip), %rsi     # 0x1e27b
movl $0x159, %edx            # imm = 0x159
leaq 0x16103(%rip), %rcx     # 0x1e88e
callq 0x2110
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x35(%rbp), %rdi
callq 0xaa00
jmp 0x8943
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x74(%rbp), %rdi
callq 0x21e0
jmp 0x893a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb4(%rbp), %rdi
callq 0xa8e0
jmp 0x8931
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x8901
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x8818
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x180(%rbp), %rdi
callq 0xc910
leaq -0x1bf(%rbp), %rdi
callq 0xc970
jmp 0x8901
leaq -0xe8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xc990
movb %al, -0x219(%rbp)
jmp 0x8841
movb -0x219(%rbp), %al
testb $0x1, %al
jne 0x884d
jmp 0x884f
jmp 0x886e
leaq 0x1604b(%rip), %rdi     # 0x1e8a1
leaq 0x15a1e(%rip), %rsi     # 0x1e27b
movl $0x15a, %edx            # imm = 0x15A
leaq 0x16025(%rip), %rcx     # 0x1e88e
callq 0x2110
leaq -0x110(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0xaa20
movb %al, -0x21a(%rbp)
jmp 0x8889
movb -0x21a(%rbp), %al
testb $0x1, %al
jne 0x8895
jmp 0x8897
jmp 0x88b6
leaq 0x15f27(%rip), %rdi     # 0x1e7c5
leaq 0x159d6(%rip), %rsi     # 0x1e27b
movl $0x15b, %edx            # imm = 0x15B
leaq 0x15fdd(%rip), %rcx     # 0x1e88e
callq 0x2110
leaq -0x110(%rbp), %rdi
callq 0xaae0
leaq -0xe8(%rbp), %rdi
callq 0xbf70
leaq -0xd0(%rbp), %rdi
callq 0xa9a0
leaq -0xa0(%rbp), %rdi
callq 0xaae0
leaq -0x60(%rbp), %rdi
callq 0xbf70
leaq -0x18(%rbp), %rdi
callq 0xa9a0
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
leaq -0x110(%rbp), %rdi
callq 0xaae0
leaq -0xe8(%rbp), %rdi
callq 0xbf70
leaq -0xd0(%rbp), %rdi
callq 0xa9a0
leaq -0xa0(%rbp), %rdi
callq 0xaae0
leaq -0x60(%rbp), %rdi
callq 0xbf70
leaq -0x18(%rbp), %rdi
callq 0xa9a0
movq -0x40(%rbp), %rdi
callq 0x22b0
nopl (%rax)