// File: ef-gy[P]libefgy/include/ef.gy/polytope.h
// Function: efgy::geometry::generators::mask::cube<3ul>::faces()
static std::set<face> faces(void) {
    static std::set<face> faces{{vector({false, false}), vector({false, true}),
                                 vector({true, true}), vector({true, false})}};
    if (faces.size() == size()) {
      return faces;
    }

    for (std::size_t i = 2; i < depth; i++) {
      std::set<face> newFaces;

      for (auto fa : faces) {
        auto x = fa;

        for (std::size_t j = 0; j < 4; j++) {
          const auto &la = fa[j];
          const auto &lb = fa[((j + 1) % 4)];

          const auto &ma = la < lb ? la : lb;
          const auto &mb = la < lb ? lb : la;

          face n{{ma, mb, mb, ma}};

          n[2][i] = true;
          n[3][i] = true;

          // this should have the smallest element first, because
          //  - n[2] must be >= to n[1] because we set an extra bit
          //  - n[3] must be >= to n[0] because we set an extra bit
          //  - n[0] is <= n[1]
          newFaces.insert(n);
        }

        x[0][i] = true;
        x[1][i] = true;
        x[2][i] = true;
        x[3][i] = true;

        // since we moved this face in the new direction, we reverse the winding
        // direction in order to reverse the normal.
        std::reverse(x.begin(), x.end());

        // this makes sure that the smallest vertex (via min_element) is first.
        // std::rotate(x.begin(), std::min_element(x.begin(), x.end()),
        // x.end());

        newFaces.insert(x);
      }

      faces.insert(newFaces.begin(), newFaces.end());
    }

    return faces;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x118(%rbp)
movq %rdi, %rax
movq %rax, -0x110(%rbp)
movq %rdi, -0x8(%rbp)
cmpb $0x0, 0x28049(%rip)     # 0x5b9e0
jne 0x33b5f
leaq 0x2803c(%rip), %rdi     # 0x5b9e0
callq 0x55f0
cmpl $0x0, %eax
je 0x33b5f
leaq -0x24(%rbp), %rcx
movq %rcx, -0x130(%rbp)
movb $0x0, -0x24(%rbp)
movb $0x0, -0x23(%rbp)
movq %rcx, %rax
addq $0x2, %rax
addq $0x3, %rcx
movq %rcx, -0x128(%rbp)
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rax
movq -0x128(%rbp), %rcx
movb $0x0, (%rax)
addq $0x1, %rax
cmpq %rcx, %rax
movq %rax, -0x120(%rbp)
jne 0x339de
movq -0x130(%rbp), %rax
movq %rax, %rcx
addq $0x3, %rcx
movb $0x0, 0x3(%rax)
movb $0x1, 0x4(%rax)
movq %rcx, %rax
addq $0x2, %rax
addq $0x3, %rcx
movq %rcx, -0x140(%rbp)
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rax
movq -0x140(%rbp), %rcx
movb $0x0, (%rax)
addq $0x1, %rax
cmpq %rcx, %rax
movq %rax, -0x138(%rbp)
jne 0x33a2e
movq -0x130(%rbp), %rax
movq %rax, %rcx
addq $0x6, %rcx
movb $0x1, 0x6(%rax)
movb $0x1, 0x7(%rax)
movq %rcx, %rax
addq $0x2, %rax
addq $0x3, %rcx
movq %rcx, -0x150(%rbp)
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
movq -0x150(%rbp), %rcx
movb $0x0, (%rax)
addq $0x1, %rax
cmpq %rcx, %rax
movq %rax, -0x148(%rbp)
jne 0x33a7e
movq -0x130(%rbp), %rax
movq %rax, %rcx
addq $0x9, %rcx
movb $0x1, 0x9(%rax)
movb $0x0, 0xa(%rax)
movq %rcx, %rax
addq $0x2, %rax
addq $0x3, %rcx
movq %rcx, -0x160(%rbp)
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq -0x160(%rbp), %rcx
movb $0x0, (%rax)
addq $0x1, %rax
cmpq %rcx, %rax
movq %rax, -0x158(%rbp)
jne 0x33ace
leaq -0x24(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x1, -0x10(%rbp)
leaq -0x26(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x341f0
movq -0x168(%rbp), %r8
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x27e8b(%rip), %rdi     # 0x5b9b0
leaq -0x25(%rbp), %rcx
callq 0x34210
jmp 0x33b30
leaq -0x26(%rbp), %rdi
callq 0x342e0
leaq 0x690(%rip), %rdi       # 0x341d0
leaq 0x27e69(%rip), %rsi     # 0x5b9b0
leaq 0x277fa(%rip), %rdx     # 0x5b348
callq 0x5310
leaq 0x27e86(%rip), %rdi     # 0x5b9e0
callq 0x5260
leaq 0x27e4a(%rip), %rdi     # 0x5b9b0
callq 0x341b0
movq %rax, -0x170(%rbp)
callq 0x34160
movq %rax, %rcx
movq -0x170(%rbp), %rax
cmpq %rcx, %rax
jne 0x33bc4
movq -0x118(%rbp), %rdi
leaq 0x27e1c(%rip), %rsi     # 0x5b9b0
callq 0x34300
jmp 0x33fe6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x26(%rbp), %rdi
callq 0x342e0
leaq 0x27e26(%rip), %rdi     # 0x5b9e0
callq 0x5250
jmp 0x33ff6
movq $0x2, -0x40(%rbp)
cmpq $0x3, -0x40(%rbp)
jae 0x33fd3
leaq -0x70(%rbp), %rdi
callq 0x34330
leaq 0x27dc9(%rip), %rax     # 0x5b9b0
movq %rax, -0x78(%rbp)
leaq 0x27dbe(%rip), %rdi     # 0x5b9b0
callq 0x34000
movq %rax, -0x80(%rbp)
leaq 0x27dae(%rip), %rdi     # 0x5b9b0
callq 0x34030
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x34060
testb $0x1, %al
jne 0x33c27
jmp 0x33f73
leaq -0x80(%rbp), %rdi
callq 0x34090
movq (%rax), %rcx
movq %rcx, -0x94(%rbp)
movl 0x8(%rax), %eax
movl %eax, -0x8c(%rbp)
movq -0x94(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0x8c(%rbp), %eax
movl %eax, -0x98(%rbp)
movq $0x0, -0xa8(%rbp)
cmpq $0x4, -0xa8(%rbp)
jae 0x33e76
movq -0xa8(%rbp), %rsi
leaq -0x94(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x34350
movq -0x180(%rbp), %rdi
movq %rax, -0xb0(%rbp)
movl -0xa8(%rbp), %eax
incl %eax
andl $0x3, %eax
movl %eax, %esi
callq 0x34350
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x34380
movb %al, -0x171(%rbp)
jmp 0x33cd2
movb -0x171(%rbp), %al
testb $0x1, %al
jne 0x33cde
jmp 0x33cee
movq -0xb0(%rbp), %rax
movq %rax, -0x188(%rbp)
jmp 0x33cfc
movq -0xb8(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0xb0(%rbp), %rdi
movq -0xb8(%rbp), %rsi
callq 0x34380
movb %al, -0x189(%rbp)
jmp 0x33d25
movb -0x189(%rbp), %al
testb $0x1, %al
jne 0x33d31
jmp 0x33d41
movq -0xb8(%rbp), %rax
movq %rax, -0x198(%rbp)
jmp 0x33d4f
movq -0xb0(%rbp), %rax
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rax
movb 0x2(%rax), %cl
movb %cl, -0xd2(%rbp)
movw (%rax), %ax
movw %ax, -0xd4(%rbp)
movq -0xc8(%rbp), %rax
movb 0x2(%rax), %cl
movb %cl, -0xcf(%rbp)
movw (%rax), %ax
movw %ax, -0xd1(%rbp)
movq -0xc8(%rbp), %rax
movb 0x2(%rax), %cl
movb %cl, -0xcc(%rbp)
movw (%rax), %ax
movw %ax, -0xce(%rbp)
movq -0xc0(%rbp), %rax
movb 0x2(%rax), %cl
movb %cl, -0xc9(%rbp)
movw (%rax), %ax
movw %ax, -0xcb(%rbp)
leaq -0xd4(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
movl $0x2, %esi
callq 0x34350
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x343e0
movq -0x1b0(%rbp), %rdi
movb $0x1, (%rax)
movl $0x3, %esi
callq 0x34350
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x343e0
movq -0x1b0(%rbp), %rsi
movb $0x1, (%rax)
leaq -0x70(%rbp), %rdi
callq 0x34410
movb %dl, -0x1a1(%rbp)
movq %rax, -0x1a0(%rbp)
jmp 0x33e2b
movb -0x1a1(%rbp), %al
movq -0x1a0(%rbp), %rcx
movq %rcx, -0xe8(%rbp)
movb %al, -0xe0(%rbp)
movq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xa8(%rbp)
jmp 0x33c68
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x341d0
jmp 0x33ff6
xorl %eax, %eax
movl %eax, %esi
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x34350
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x343e0
movq -0x1c0(%rbp), %rdi
movb $0x1, (%rax)
movl $0x1, %esi
callq 0x34350
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x343e0
movq -0x1c0(%rbp), %rdi
movb $0x1, (%rax)
movl $0x2, %esi
callq 0x34350
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x343e0
movq -0x1c0(%rbp), %rdi
movb $0x1, (%rax)
movl $0x3, %esi
callq 0x34350
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x343e0
movq -0x1c0(%rbp), %rdi
movb $0x1, (%rax)
callq 0x344a0
movq -0x1c0(%rbp), %rdi
movq %rax, -0x1b8(%rbp)
callq 0x344c0
movq -0x1b8(%rbp), %rdi
movq %rax, %rsi
callq 0x34460
jmp 0x33f2c
leaq -0x70(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x34410
movb %dl, -0x1c9(%rbp)
movq %rax, -0x1c8(%rbp)
jmp 0x33f4b
movb -0x1c9(%rbp), %al
movq -0x1c8(%rbp), %rcx
movq %rcx, -0xf8(%rbp)
movb %al, -0xf0(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x34130
jmp 0x33c0e
leaq -0x70(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x34000
movq -0x1d8(%rbp), %rdi
movq %rax, -0x100(%rbp)
callq 0x34030
movq %rax, -0x108(%rbp)
movq -0x100(%rbp), %rsi
movq -0x108(%rbp), %rdx
leaq 0x279fe(%rip), %rdi     # 0x5b9b0
callq 0x344e0
jmp 0x33fb9
leaq -0x70(%rbp), %rdi
callq 0x341d0
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x33bcc
movq -0x118(%rbp), %rdi
leaq 0x279cf(%rip), %rsi     # 0x5b9b0
callq 0x34300
movq -0x110(%rbp), %rax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x55b0
nop