// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movb 0xcf05(%rip), %al       # 0x208c0
testb %al, %al
je 0x13bdf
cmpq $0x6, 0xceed(%rip)      # 0x208b8
je 0x13bbe
movq %rbx, 0x28(%rsp)
leaq 0x40(%rsp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
movq 0xceae(%rip), %rcx      # 0x208a8
leaq 0xce97(%rip), %rax      # 0x20898
cmpq %rax, %rcx
je 0x13b99
leaq 0x1f(%rsp), %rbx
movb $0x1, %r14b
leaq 0x38(%rsp), %r12
movl 0x28(%rcx), %eax
movl %eax, 0x18(%rsp)
movq 0x20(%rcx), %rax
movq %rax, 0x10(%rsp)
movl 0x28(%rcx), %eax
movl %eax, 0x8(%rsp)
movq %rcx, 0x30(%rsp)
movq 0x20(%rcx), %rax
movq %rax, (%rsp)
leaq 0x10(%rsp), %rbp
movb $0x1, %r15b
xorl %r13d, %r13d
movzbl %r15b, %eax
andl $0x3, %eax
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax), %rdx
addq $0x10, %rdx
leaq (,%r13,2), %rax
addq %r13, %rax
leaq (%rsp,%rax), %rcx
addq $0x10, %rcx
incq %r13
movl %r13d, %eax
andl $0x3, %eax
leaq (%rax,%rax,2), %rax
addq %rsp, %rax
addq $0x10, %rax
xorl %esi, %esi
movb (%rbp,%rsi), %dil
movb (%rdx,%rsi), %r8b
cmpb %dil, %r8b
jne 0x13a9d
incq %rsi
cmpq $0x3, %rsi
jne 0x13a82
xorl %esi, %esi
jmp 0x13aa1
seta %sil
xorl %edi, %edi
movb (%rbp,%rdi), %r8b
movb (%rdx,%rdi), %r9b
cmpb %r8b, %r9b
jne 0x13abf
incq %rdi
cmpq $0x3, %rdi
jne 0x13aa3
movq %rcx, %rdx
jmp 0x13ac6
movq %rcx, %rdx
cmovaq %rax, %rdx
testb %sil, %sil
cmovneq %rcx, %rax
movb 0x2(%rax), %cl
movb %cl, 0x1e(%rsp)
movzwl (%rax), %ecx
movw %cx, 0x1c(%rsp)
movb 0x2(%rdx), %cl
movb %cl, 0x2(%rbx)
movzwl (%rdx), %ecx
movw %cx, (%rbx)
movb 0x2(%rdx), %cl
movb %cl, 0x5(%rbx)
movzwl (%rdx), %ecx
movw %cx, 0x3(%rbx)
movb 0x2(%rax), %cl
movb %cl, 0x8(%rbx)
movzwl (%rax), %eax
movw %ax, 0x6(%rbx)
movb %r14b, 0x24(%rsp)
movb %r14b, 0x27(%rsp)
movq %r12, %rdi
leaq 0x1c(%rsp), %rsi
callq 0x141fc
incb %r15b
addq $0x3, %rbp
cmpq $0x4, %r13
jne 0x13a46
movb %r14b, 0x2(%rsp)
movb %r14b, 0x5(%rsp)
movb %r14b, 0x8(%rsp)
movb %r14b, 0xb(%rsp)
leaq 0x9(%rsp), %rax
movq %rsp, %rsi
movq %rsi, %rcx
movq 0x30(%rsp), %r15
xorl %edx, %edx
movb (%rcx,%rdx), %r8b
movb (%rax,%rdx), %dil
movb %dil, (%rcx,%rdx)
movb %r8b, (%rax,%rdx)
incq %rdx
cmpq $0x3, %rdx
jne 0x13b50
addq $0x3, %rcx
addq $-0x3, %rax
cmpq %rax, %rcx
jb 0x13b4e
movq %r12, %rdi
callq 0x141fc
movq %r15, %rdi
callq 0x42d0
movq %rax, %rcx
leaq 0xcd08(%rip), %rax      # 0x20898
cmpq %rax, %rcx
jne 0x13a17
movq 0x50(%rsp), %rsi
leaq 0xcceb(%rip), %rdi      # 0x20890
leaq 0x40(%rsp), %rdx
callq 0x14232
leaq 0x38(%rsp), %rdi
callq 0x13d04
movq 0x28(%rsp), %rbx
leaq 0xcccb(%rip), %rsi      # 0x20890
movq %rbx, %rdi
callq 0x14052
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xccda(%rip), %rdi      # 0x208c0
callq 0x43f0
testl %eax, %eax
je 0x139c3
movabsq $0x101000100000000, %rax # imm = 0x101000100000000
leaq 0x38(%rsp), %rsi
movq %rax, (%rsi)
movl $0x100, 0x8(%rsi)       # imm = 0x100
leaq 0xcc7d(%rip), %rdi      # 0x20890
leaq 0x10(%rsp), %rcx
movq %rsp, %r8
movl $0x1, %edx
callq 0x13c80
leaq 0x4e(%rip), %rdi        # 0x13c7a
leaq 0xcc5d(%rip), %rsi      # 0x20890
leaq 0xc5ee(%rip), %rdx      # 0x20228
callq 0x4200
leaq 0xcc7a(%rip), %rdi      # 0x208c0
callq 0x4180
jmp 0x139c3
movq %rax, %rbx
leaq 0xcc66(%rip), %rdi      # 0x208c0
callq 0x4170
jmp 0x13c72
jmp 0x13c65
jmp 0x13c65
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x13d04
movq %rbx, %rdi
callq 0x43d0