// File: /workspace/github_cpp_makefile_star2_O1/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 0x6880
movq %rdi, %rbx
movl %eax, -0x9c(%rbp)
callq 0x5a38
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)
sete %r14b
jne 0x661d
leaq -0x98(%rbp), %r15
movq %rbx, %rdi
callq 0x5a38
testb $0x1, %r14b
je 0x661d
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 0x6898
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x68a4
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x68a4
testl %ecx, %ecx
jne 0x6443
movl %r13d, (%r14)
decl %eax
movl %eax, -0xa0(%rbp)
movq -0x48(%rbp), %rsi
cmpq -0x40(%rbp), %rsi
je 0x6461
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x48(%rbp)
jmp 0x6471
leaq -0x50(%rbp), %rdi
leaq -0xa0(%rbp), %rdx
callq 0x72a6
movl 0xe0(%rbx), %r12d
cmpl $0xa, %r12d
jne 0x6543
movq %rbx, %rdi
callq 0x5a38
cmpl $0xa, %r12d
jne 0x6543
movl 0xe0(%rbx), %r12d
cmpl $0xb, %r12d
jne 0x6543
movq %rbx, %rdi
callq 0x5a38
cmpl $0xb, %r12d
jne 0x6543
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 0x692c
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x6938
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x6938
testl %ecx, %ecx
jne 0x6512
movl %r13d, (%r14)
decl %eax
movl %eax, -0x2c(%rbp)
movq -0x88(%rbp), %rsi
cmpq -0x80(%rbp), %rsi
je 0x6533
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x88(%rbp)
jmp 0x6543
leaq -0x90(%rbp), %rdi
leaq -0x2c(%rbp), %rdx
callq 0x72a6
movl 0xe0(%rbx), %r12d
cmpl $0xa, %r12d
jne 0x660c
movq %rbx, %rdi
callq 0x5a38
cmpl $0xa, %r12d
jne 0x660c
movl 0xe0(%rbx), %r12d
cmpl $0xb, %r12d
jne 0x660c
movq %rbx, %rdi
callq 0x5a38
cmpl $0xb, %r12d
jne 0x660c
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 0x6944
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x6950
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x6950
testl %ecx, %ecx
jne 0x65e4
movl %r13d, (%r14)
decl %eax
movl %eax, -0x2c(%rbp)
movq -0x68(%rbp), %rsi
cmpq -0x60(%rbp), %rsi
je 0x65ff
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, -0x68(%rbp)
jmp 0x660c
leaq -0x70(%rbp), %rdi
leaq -0x2c(%rbp), %rdx
callq 0x72a6
cmpl $0xb, 0xe0(%rbx)
sete %r14b
je 0x63cf
movq -0x88(%rbp), %rax
subq -0x90(%rbp), %rax
je 0x663e
movq -0x48(%rbp), %rcx
subq -0x50(%rbp), %rcx
cmpq %rcx, %rax
jne 0x68b0
movq -0x68(%rbp), %rax
subq -0x70(%rbp), %rax
je 0x6659
movq -0x48(%rbp), %rcx
subq -0x50(%rbp), %rcx
cmpq %rcx, %rax
jne 0x68cf
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rax
subq %rdx, %rax
sarq $0x2, %rax
addq $-0x3, %rax
cmpq $-0x3, %rax
ja 0x67fc
leaq 0x50(%rbx), %r14
leaq 0x68(%rbx), %rax
movq %rax, -0xa8(%rbp)
leaq 0x80(%rbx), %r12
movl $0x1, %ecx
movl $0x4, %r13d
movq 0x58(%rbx), %rsi
cmpq 0x60(%rbx), %rsi
movq %rcx, -0xb0(%rbp)
je 0x66b6
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x58(%rbx)
jmp 0x66be
movq %r14, %rdi
callq 0x72a6
movq -0x70(%rbp), %rdx
cmpq %rdx, -0x68(%rbp)
je 0x66ec
movq 0x70(%rbx), %rsi
cmpq 0x78(%rbx), %rsi
je 0x66e0
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x70(%rbx)
jmp 0x66ec
movq -0xa8(%rbp), %rdi
callq 0x72a6
movq -0x90(%rbp), %rdx
cmpq %rdx, -0x88(%rbp)
je 0x6725
movq 0x88(%rbx), %rsi
cmpq 0x90(%rbx), %rsi
je 0x671d
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x88(%rbx)
jmp 0x6725
movq %r12, %rdi
callq 0x72a6
xorl %r15d, %r15d
movq -0x50(%rbp), %rdx
addq %r13, %rdx
addq %r15, %rdx
movq 0x58(%rbx), %rsi
cmpq 0x60(%rbx), %rsi
je 0x674a
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x58(%rbx)
jmp 0x6752
movq %r14, %rdi
callq 0x72a6
movq -0x70(%rbp), %rdx
cmpq %rdx, -0x68(%rbp)
je 0x6786
addq %r13, %rdx
addq %r15, %rdx
movq 0x70(%rbx), %rsi
cmpq 0x78(%rbx), %rsi
je 0x677a
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x70(%rbx)
jmp 0x6786
movq -0xa8(%rbp), %rdi
callq 0x72a6
movq -0x90(%rbp), %rdx
cmpq %rdx, -0x88(%rbp)
je 0x67c5
addq %r13, %rdx
addq %r15, %rdx
movq 0x88(%rbx), %rsi
cmpq 0x90(%rbx), %rsi
je 0x67bd
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x88(%rbx)
jmp 0x67c5
movq %r12, %rdi
callq 0x72a6
addq $0x4, %r15
cmpq $0x4, %r15
je 0x6728
movq -0xb0(%rbp), %rcx
incq %rcx
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rax
subq %rdx, %rax
sarq $0x2, %rax
decq %rax
addq $0x4, %r13
cmpq %rax, %rcx
jb 0x6697
movq 0x70(%rbx), %rax
subq 0x68(%rbx), %rax
je 0x6817
movq 0x58(%rbx), %rcx
subq 0x50(%rbx), %rcx
cmpq %rcx, %rax
jne 0x68ee
movq 0x88(%rbx), %rax
subq 0x80(%rbx), %rax
je 0x6838
movq 0x58(%rbx), %rcx
subq 0x50(%rbx), %rcx
cmpq %rcx, %rax
jne 0x690d
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x684d
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x3250
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x6865
movq -0x80(%rbp), %rsi
subq %rdi, %rsi
callq 0x3250
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x687a
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 0x1dd2(%rip), %rdi      # 0x8671
callq 0x3160
leaq 0x1dc6(%rip), %rdi      # 0x8671
callq 0x3330
leaq 0x1ca9(%rip), %rdi      # 0x8560
leaq 0x1cc5(%rip), %rsi      # 0x8583
leaq 0x1ccf(%rip), %rcx      # 0x8594
movl $0x158, %edx            # imm = 0x158
callq 0x3170
leaq 0x1d1a(%rip), %rdi      # 0x85f0
leaq 0x1ca6(%rip), %rsi      # 0x8583
leaq 0x1cb0(%rip), %rcx      # 0x8594
movl $0x15a, %edx            # imm = 0x15A
callq 0x3170
leaq 0x1d1e(%rip), %rdi      # 0x8613
leaq 0x1c87(%rip), %rsi      # 0x8583
leaq 0x1c91(%rip), %rcx      # 0x8594
movl $0x16f, %edx            # imm = 0x16F
callq 0x3170
leaq 0x1d2e(%rip), %rdi      # 0x8642
leaq 0x1c68(%rip), %rsi      # 0x8583
leaq 0x1c72(%rip), %rcx      # 0x8594
movl $0x172, %edx            # imm = 0x172
callq 0x3170
leaq 0x1d3e(%rip), %rdi      # 0x8671
callq 0x3160
leaq 0x1d32(%rip), %rdi      # 0x8671
callq 0x3330
leaq 0x1d26(%rip), %rdi      # 0x8671
callq 0x3160
leaq 0x1d1a(%rip), %rdi      # 0x8671
callq 0x3330
jmp 0x6978
jmp 0x6978
jmp 0x696a
jmp 0x696a
jmp 0x6978
jmp 0x6978
jmp 0x6978
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x697b
movl %r13d, (%r14)
jmp 0x697b
movq %rax, %rbx
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x6990
movq -0x60(%rbp), %rsi
subq %rdi, %rsi
callq 0x3250
movq -0x90(%rbp), %rdi
testq %rdi, %rdi
je 0x69a8
movq -0x80(%rbp), %rsi
subq %rdi, %rsi
callq 0x3250
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x69bd
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x3250
movq %rbx, %rdi
callq 0x3420
nop