// File: dacunni[P]stlloader/./stlloader.h
// Function: stlloader::parse_ascii_facet(std::istream&, stlloader::Facet&)
void parse_ascii_facet(std::istream & is, Facet & facet)
{
    std::string label, sub;
    auto ss = getlinestream(is);
    ss >> label >> sub;
    if(label == "outer" && sub == "loop") {
        int vi = 0;
        do {
            auto ss = getlinestream(is);
            ss >> label;
            if(label == "vertex") {
                if(vi < 3) {
                    ss >> facet.vertices[vi];
                }
                ++vi;
            }
        } while(label != "endloop");
        if(vi > 3)
            throw; // only support triangles
    }
    else { throw; }
    consume(is, "endfacet");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3b0, %rsp            # imm = 0x3B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3390
leaq -0x50(%rbp), %rdi
callq 0x3390
movq -0x8(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x3920
jmp 0x39d7
leaq -0x1d0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3340
movq %rax, -0x390(%rbp)
jmp 0x39f0
movq -0x390(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x3340
jmp 0x3a02
leaq 0x3633(%rip), %rsi      # 0x703c
leaq -0x30(%rbp), %rdi
callq 0x5230
movb %al, -0x391(%rbp)
jmp 0x3a1a
movb -0x391(%rbp), %al
testb $0x1, %al
jne 0x3a29
jmp 0x3b7a
leaq 0x361c(%rip), %rsi      # 0x704c
leaq -0x50(%rbp), %rdi
callq 0x5230
movb %al, -0x392(%rbp)
jmp 0x3a41
movb -0x392(%rbp), %al
testb $0x1, %al
jne 0x3a50
jmp 0x3b7a
movl $0x0, -0x1e0(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x360(%rbp), %rdi
callq 0x3920
jmp 0x3a6c
leaq -0x360(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3340
jmp 0x3a7e
leaq 0x35bd(%rip), %rsi      # 0x7042
leaq -0x30(%rbp), %rdi
callq 0x5230
movb %al, -0x393(%rbp)
jmp 0x3a96
movb -0x393(%rbp), %al
testb $0x1, %al
jne 0x3aa5
jmp 0x3b31
cmpl $0x3, -0x1e0(%rbp)
jge 0x3b22
movq -0x10(%rbp), %rax
movslq -0x1e0(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,4), %rsi
leaq -0x360(%rbp), %rdi
callq 0x35c0
jmp 0x3acf
jmp 0x3b22
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
jmp 0x3c5c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
jmp 0x3c50
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
leaq -0x360(%rbp), %rdi
callq 0x3150
jmp 0x3c50
movl -0x1e0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e0(%rbp)
leaq -0x360(%rbp), %rdi
callq 0x3150
leaq 0x3505(%rip), %rsi      # 0x7049
leaq -0x30(%rbp), %rdi
callq 0x5260
movb %al, -0x394(%rbp)
jmp 0x3b55
movb -0x394(%rbp), %al
testb $0x1, %al
jne 0x3a5a
jmp 0x3b65
cmpl $0x3, -0x1e0(%rbp)
jle 0x3b78
callq 0x33a0
jmp 0x3c7a
jmp 0x3b84
callq 0x33a0
jmp 0x3c7a
movq -0x8(%rbp), %rax
movq %rax, -0x3a8(%rbp)
leaq -0x381(%rbp), %rdi
movq %rdi, -0x3a0(%rbp)
callq 0x3450
movq -0x3a0(%rbp), %rdx
leaq 0x34a1(%rip), %rsi      # 0x7051
leaq -0x380(%rbp), %rdi
callq 0x5290
jmp 0x3bbe
movq -0x3a8(%rbp), %rdi
leaq -0x380(%rbp), %rsi
callq 0x3830
jmp 0x3bd3
leaq -0x380(%rbp), %rdi
callq 0x3190
leaq -0x381(%rbp), %rdi
callq 0x32b0
leaq -0x1d0(%rbp), %rdi
callq 0x3150
leaq -0x50(%rbp), %rdi
callq 0x3190
leaq -0x30(%rbp), %rdi
callq 0x3190
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
jmp 0x3c44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1d8(%rbp)
movl %eax, -0x1dc(%rbp)
leaq -0x380(%rbp), %rdi
callq 0x3190
leaq -0x381(%rbp), %rdi
callq 0x32b0
leaq -0x1d0(%rbp), %rdi
callq 0x3150
leaq -0x50(%rbp), %rdi
callq 0x3190
leaq -0x30(%rbp), %rdi
callq 0x3190
movq -0x1d8(%rbp), %rdi
callq 0x3440
nopw (%rax,%rax)