// File: /workspace/github_cpp_makefile_star2_O3/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 0xcecd(%rip), %al       # 0x208c0
testb %al, %al
je 0x13c12
cmpq $0x6, 0xceb5(%rip)      # 0x208b8
je 0x13bf1
leaq 0x40(%rsp), %rdx
movl $0x0, (%rdx)
xorl %eax, %eax
movq %rax, 0x8(%rdx)
movq %rdx, 0x10(%rdx)
movq %rdx, 0x18(%rdx)
movq %rax, 0x20(%rdx)
movq 0xce7b(%rip), %rcx      # 0x208a8
leaq 0xce64(%rip), %rax      # 0x20898
movq %rdx, %rsi
cmpq %rax, %rcx
je 0x13bdb
movq %rbx, 0x28(%rsp)
leaq 0xf(%rsp), %rbx
movb $0x1, %r14b
leaq 0x38(%rsp), %r12
movl 0x28(%rcx), %eax
movl %eax, 0x20(%rsp)
movq 0x20(%rcx), %rax
movq %rax, 0x18(%rsp)
movl 0x28(%rcx), %eax
movl %eax, 0x8(%rsp)
movq %rcx, 0x30(%rsp)
movq 0x20(%rcx), %rax
movq %rax, (%rsp)
leaq 0x18(%rsp), %rbp
movb $0x1, %r15b
xorl %r13d, %r13d
movzbl %r15b, %eax
andl $0x3, %eax
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax), %rdx
addq $0x18, %rdx
leaq (,%r13,2), %rax
addq %r13, %rax
leaq (%rsp,%rax), %rcx
addq $0x18, %rcx
incq %r13
movl %r13d, %eax
andl $0x3, %eax
leaq (%rax,%rax,2), %rax
addq %rsp, %rax
addq $0x18, %rax
xorl %r8d, %r8d
movb (%rbp,%r8), %sil
movb (%rdx,%r8), %dil
cmpb %dil, %sil
jb 0x13adb
ja 0x13adb
leaq 0x1(%r8), %r9
cmpq $0x2, %r8
movq %r9, %r8
jne 0x13abe
xorl %r8d, %r8d
movb (%rbp,%r8), %r9b
movb (%rdx,%r8), %r10b
cmpb %r10b, %r9b
jb 0x13b00
ja 0x13afb
leaq 0x1(%r8), %r9
cmpq $0x2, %r8
movq %r9, %r8
jne 0x13ade
movq %rcx, %rdx
jmp 0x13b03
movq %rax, %rdx
cmpb %dil, %sil
cmovbq %rcx, %rax
movb 0x2(%rax), %cl
movb %cl, 0xe(%rsp)
movzwl (%rax), %ecx
movw %cx, 0xc(%rsp)
movb 0x2(%rdx), %cl
movb %cl, 0x2(%rbx)
movzwl (%rdx), %ecx
movw %cx, (%rbx)
movzwl (%rdx), %ecx
movw %cx, 0x12(%rsp)
movzwl (%rax), %eax
movw %ax, 0x15(%rsp)
movb %r14b, 0x14(%rsp)
movb %r14b, 0x17(%rsp)
movq %r12, %rdi
leaq 0xc(%rsp), %rsi
callq 0x14238
incb %r15b
addq $0x3, %rbp
cmpq $0x4, %r13
jne 0x13a81
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 0x13b83
addq $0x3, %rcx
addq $-0x3, %rax
cmpq %rax, %rcx
jb 0x13b81
movq %r12, %rdi
callq 0x14238
movq %r15, %rdi
callq 0x42d0
movq %rax, %rcx
leaq 0xccd5(%rip), %rax      # 0x20898
cmpq %rax, %rcx
jne 0x13a52
movq 0x50(%rsp), %rsi
movq 0x28(%rsp), %rbx
leaq 0x40(%rsp), %rdx
leaq 0xccae(%rip), %rdi      # 0x20890
callq 0x1426e
leaq 0x38(%rsp), %rdi
callq 0x13d38
leaq 0xcc98(%rip), %rsi      # 0x20890
movq %rbx, %rdi
callq 0x1408e
movq %rbx, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xcca7(%rip), %rdi      # 0x208c0
callq 0x43f0
testl %eax, %eax
je 0x139fb
leaq 0x38(%rsp), %rsi
movl $0x0, (%rsi)
movabsq $0x10001010001, %rax    # imm = 0x10001010001
movq %rax, 0x4(%rsi)
leaq 0xcc4a(%rip), %rdi      # 0x20890
leaq 0x18(%rsp), %rcx
movq %rsp, %r8
movl $0x1, %edx
callq 0x13cb4
leaq 0x4f(%rip), %rdi        # 0x13cae
leaq 0xcc2a(%rip), %rsi      # 0x20890
leaq 0xc5bb(%rip), %rdx      # 0x20228
callq 0x4200
leaq 0xcc47(%rip), %rdi      # 0x208c0
callq 0x4180
jmp 0x139fb
movq %rax, %rbx
leaq 0xcc33(%rip), %rdi      # 0x208c0
callq 0x4170
jmp 0x13ca5
jmp 0x13c98
jmp 0x13c98
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x13d38
movq %rbx, %rdi
callq 0x43d0
nop