// File: /workspace/github_cpp_makefile_star2_O3/tcannon686[P]obj2webgl/./obj_parser.hpp
// Function: ObjParser<std::basic_ifstream<char, std::char_traits<char>>>::parseFace()
bool parseFace()
    {
        if(accept(TokenType::FACE))
        {
            std::vector<int> vIndices;
            std::vector<int> tIndices;
            std::vector<int> nIndices;

            while(accept(TokenType::NUMBER))
            {
                int v_index = stoi(token) - 1;
                vIndices.push_back(v_index);
                
                if(accept(TokenType::INDEX_SEPARATOR))
                {
                    if(accept(TokenType::NUMBER))
                    {
                        int t_index = stoi(token) - 1;
                        tIndices.push_back(t_index);
                    }
                }

                if(accept(TokenType::INDEX_SEPARATOR))
                {
                    if(accept(TokenType::NUMBER))
                    {
                        int n_index = stoi(token) - 1;
                        nIndices.push_back(n_index);
                    }
                }
            }

            if(tIndices.size() > 0)
                assert(tIndices.size() == vIndices.size());
            if(nIndices.size() > 0)
                assert(nIndices.size() == vIndices.size());

            /* Convert to triangles. */
            for(std::size_t i = 1; i < vIndices.size() - 1; i ++)
            {
                this->vIndices.push_back(vIndices[0]);
                if(nIndices.size() > 0)
                    this->nIndices.push_back(nIndices[0]);
                if(tIndices.size() > 0)
                    this->tIndices.push_back(tIndices[0]);
                for(std::size_t j = 0; j < 2; j ++)
                {
                    this->vIndices.push_back(vIndices[i + j]);
                    if(nIndices.size() > 0)
                        this->nIndices.push_back(nIndices[i + j]);
                    if(tIndices.size() > 0)
                        this->tIndices.push_back(tIndices[i + j]);
                }
            }

            if(this->nIndices.size() > 0)
                assert(this->nIndices.size() == this->vIndices.size());
            
            if(this->tIndices.size() > 0)
                assert(this->tIndices.size() == this->vIndices.size());

            return true;
        }
        return false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl 0xe0(%rdi), %eax
cmpl $0x4, %eax
jne 0x6842
movq %rdi, %rbx
movl %eax, -0x9c(%rbp)
callq 0x5a26
xorl %eax, %eax
movq %rax, -0x40(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq %rax, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movq %rax, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
cmpl $0xb, 0xe0(%rbx)
jne 0x65de
leaq -0x98(%rbp), %r15
movq %rbx, %rdi
callq 0x5a26
movq 0xa0(%rbx), %r12
callq 0x3040
movq %rax, %r14
movl (%rax), %r13d
movl $0x0, (%rax)
movq %r12, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x3320
cmpq %r12, -0x98(%rbp)
je 0x685a
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x6866
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x6866
testl %ecx, %ecx
jne 0x6417
movl %r13d, (%r14)
decl %eax
movl %eax, -0xa0(%rbp)
movq -0x48(%rbp), %rsi
cmpq -0x40(%rbp), %rsi
je 0x6435
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x6445
leaq -0x50(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
callq 0x7244
movl 0xe0(%rbx), %eax
cmpl $0xa, %eax
jne 0x65b4
movq %rbx, %rdi
callq 0x5a26
movl 0xe0(%rbx), %eax
cmpl $0xb, %eax
jne 0x6505
movq %rbx, %rdi
callq 0x5a26
movq 0xa0(%rbx), %r12
movl (%r14), %r13d
movl $0x0, (%r14)
movq %r12, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x3320
cmpq %r12, -0x98(%rbp)
je 0x687e
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x6872
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x6872
testl %ecx, %ecx
jne 0x64ce
movl %r13d, (%r14)
decl %eax
movl %eax, -0x2c(%rbp)
movq -0x88(%rbp), %rsi
cmpq -0x80(%rbp), %rsi
je 0x64ef
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x88(%rbp)
jmp 0x64ff
leaq -0x90(%rbp), %rdi
leaq -0x2c(%rbp), %rdx
callq 0x7244
movl 0xe0(%rbx), %eax
cmpl $0xa, %eax
jne 0x65b4
movq %rbx, %rdi
callq 0x5a26
cmpl $0xb, 0xe0(%rbx)
jne 0x65bd
movq %rbx, %rdi
callq 0x5a26
movq 0xa0(%rbx), %r12
movl (%r14), %r13d
movl $0x0, (%r14)
movq %r12, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x3320
cmpq %r12, -0x98(%rbp)
je 0x688a
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x6896
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x6896
testl %ecx, %ecx
jne 0x6586
movl %r13d, (%r14)
decl %eax
movl %eax, -0x2c(%rbp)
movq -0x68(%rbp), %rsi
cmpq -0x60(%rbp), %rsi
je 0x65a1
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x68(%rbp)
jmp 0x65ae
leaq -0x70(%rbp), %rdi
leaq -0x2c(%rbp), %rdx
callq 0x7244
movl 0xe0(%rbx), %eax
cmpl $0xb, %eax
je 0x63ad
movq -0x88(%rbp), %rax
subq -0x90(%rbp), %rax
je 0x65de
movq -0x48(%rbp), %rcx
subq -0x50(%rbp), %rcx
cmpq %rcx, %rax
jne 0x68e0
movq -0x68(%rbp), %rcx
subq -0x70(%rbp), %rcx
je 0x6617
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rax
subq %rdx, %rax
cmpq %rax, %rcx
je 0x6622
leaq 0x1ff1(%rip), %rdi      # 0x85f0
leaq 0x1f7d(%rip), %rsi      # 0x8583
leaq 0x1f87(%rip), %rcx      # 0x8594
movl $0x15a, %edx            # imm = 0x15A
callq 0x3170
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rax
subq %rdx, %rax
sarq $0x2, %rax
addq $-0x3, %rax
cmpq $-0x3, %rax
ja 0x67be
leaq 0x50(%rbx), %r14
leaq 0x68(%rbx), %rax
movq %rax, -0xb0(%rbp)
leaq 0x80(%rbx), %rax
movq %rax, -0xa8(%rbp)
movl $0x1, %r13d
movq 0x58(%rbx), %rsi
cmpq 0x60(%rbx), %rsi
je 0x666f
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x58(%rbx)
jmp 0x6677
movq %r14, %rdi
callq 0x7244
movq -0x70(%rbp), %rdx
cmpq %rdx, -0x68(%rbp)
je 0x66a5
movq 0x70(%rbx), %rsi
cmpq 0x78(%rbx), %rsi
je 0x6699
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x70(%rbx)
jmp 0x66a5
movq -0xb0(%rbp), %rdi
callq 0x7244
movq -0x90(%rbp), %rdx
cmpq %rdx, -0x88(%rbp)
je 0x66e2
movq 0x88(%rbx), %rsi
cmpq 0x90(%rbx), %rsi
je 0x66d6
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x88(%rbx)
jmp 0x66e2
movq -0xa8(%rbp), %rdi
callq 0x7244
movb $0x1, %r15b
xorl %r12d, %r12d
addq %r13, %r12
leaq (,%r12,4), %rdx
addq -0x50(%rbp), %rdx
movq 0x58(%rbx), %rsi
cmpq 0x60(%rbx), %rsi
je 0x670f
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x58(%rbx)
jmp 0x6717
movq %r14, %rdi
callq 0x7244
movq -0x70(%rbp), %rax
cmpq %rax, -0x68(%rbp)
je 0x6749
leaq (%rax,%r12,4), %rdx
movq 0x70(%rbx), %rsi
cmpq 0x78(%rbx), %rsi
je 0x673d
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x70(%rbx)
jmp 0x6749
movq -0xb0(%rbp), %rdi
callq 0x7244
movq -0x90(%rbp), %rax
cmpq %rax, -0x88(%rbp)
je 0x678a
leaq (%rax,%r12,4), %rdx
movq 0x88(%rbx), %rsi
cmpq 0x90(%rbx), %rsi
je 0x677e
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x88(%rbx)
jmp 0x678a
movq -0xa8(%rbp), %rdi
callq 0x7244
movl $0x1, %r12d
testb $0x1, %r15b
movl $0x0, %r15d
jne 0x66e8
incq %r13
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rax
subq %rdx, %rax
sarq $0x2, %rax
decq %rax
cmpq %rax, %r13
jb 0x6657
movq 0x70(%rbx), %rax
subq 0x68(%rbx), %rax
je 0x67d9
movq 0x58(%rbx), %rcx
subq 0x50(%rbx), %rcx
cmpq %rcx, %rax
jne 0x68a2
movq 0x88(%rbx), %rax
subq 0x80(%rbx), %rax
je 0x67fa
movq 0x58(%rbx), %rcx
subq 0x50(%rbx), %rcx
cmpq %rcx, %rax
jne 0x68c1
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x680f
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x3250
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x6827
movq -0x80(%rbp), %rsi
subq %rdi, %rsi
callq 0x3250
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x683c
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x3250
movl -0x9c(%rbp), %eax
cmpl $0x4, %eax
sete %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1e10(%rip), %rdi      # 0x8671
callq 0x3160
leaq 0x1e04(%rip), %rdi      # 0x8671
callq 0x3330
leaq 0x1df8(%rip), %rdi      # 0x8671
callq 0x3330
leaq 0x1dec(%rip), %rdi      # 0x8671
callq 0x3160
leaq 0x1de0(%rip), %rdi      # 0x8671
callq 0x3160
leaq 0x1dd4(%rip), %rdi      # 0x8671
callq 0x3330
leaq 0x1d6a(%rip), %rdi      # 0x8613
leaq 0x1cd3(%rip), %rsi      # 0x8583
leaq 0x1cdd(%rip), %rcx      # 0x8594
movl $0x16f, %edx            # imm = 0x16F
callq 0x3170
leaq 0x1d7a(%rip), %rdi      # 0x8642
leaq 0x1cb4(%rip), %rsi      # 0x8583
leaq 0x1cbe(%rip), %rcx      # 0x8594
movl $0x172, %edx            # imm = 0x172
callq 0x3170
leaq 0x1c79(%rip), %rdi      # 0x8560
leaq 0x1c95(%rip), %rsi      # 0x8583
leaq 0x1c9f(%rip), %rcx      # 0x8594
movl $0x158, %edx            # imm = 0x158
callq 0x3170
jmp 0x691b
jmp 0x691b
jmp 0x690d
jmp 0x690d
jmp 0x691b
jmp 0x691b
jmp 0x691b
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x691e
movl %r13d, (%r14)
jmp 0x691e
movq %rax, %rbx
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x6933
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x3250
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x694b
movq -0x80(%rbp), %rsi
subq %rdi, %rsi
callq 0x3250
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x6960
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x3250
movq %rbx, %rdi
callq 0x3420