// File: /workspace/github_cpp_makefile_star2_O1/pointwiseproduct[P]untyped_lambda/untyped_lambda.cpp
// Function: tokenize_phase2::tokenize(std::vector<tokenize_phase1::token_t, std::allocator<tokenize_phase1::token_t>> const&)
token_seq_type tokenize(const tokenize_phase1::token_seq_type &vec){
        token_seq_type r;
        for(auto iter = vec.begin(); iter != vec.end(); ++iter){
            auto t = *iter;
            if(t.kind == tokenize_phase1::token_t::kind_t::lparen){
                auto lookahead = *(iter + 1);
                if(lookahead.kind == tokenize_phase1::token_t::kind_t::asterisk){
                    iter += 2;
                    for(; ; ++iter){
                        t = *iter;
                        if(t.kind == tokenize_phase1::token_t::kind_t::end){
                            throw unexpected_eof();
                        }
                        if(
                            t.kind == tokenize_phase1::token_t::kind_t::asterisk &&
                            (iter + 1)->kind == tokenize_phase1::token_t::kind_t::rparen
                        ){
                            ++iter;
                            break;
                        }
                    }
                    continue;
                }else{
                    token_t u;
                    u.beg = t.iter;
                    u.end = t.iter + 1;
                    u.line = t.line;
                    u.colunm = t.colunm;
                    u.kind = token_t::kind_t::lparen;
                    r.push_back(u);
                    continue;
                }
            }else if(t.kind != tokenize_phase1::token_t::kind_t::charactor){
                switch(t.kind){
                case tokenize_phase1::token_t::kind_t::lambda:
                    {
                        token_t u;
                        u.beg = t.iter;
                        u.end = t.iter + 1;
                        u.line = t.line;
                        u.colunm = t.colunm;
                        u.kind = token_t::kind_t::lambda;
                        r.push_back(u);
                    }
                    break;

                case tokenize_phase1::token_t::kind_t::equal:
                    {
                        token_t u;
                        u.beg = t.iter;
                        u.end = t.iter + 1;
                        u.line = t.line;
                        u.colunm = t.colunm;
                        u.kind = token_t::kind_t::equal;
                        r.push_back(u);
                    }
                    break;

                case tokenize_phase1::token_t::kind_t::dot:
                    {
                        token_t u;
                        u.beg = t.iter;
                        u.end = t.iter + 1;
                        u.line = t.line;
                        u.colunm = t.colunm;
                        u.kind = token_t::kind_t::dot;
                        r.push_back(u);
                    }
                    break;

                case tokenize_phase1::token_t::kind_t::lparen:
                    {
                        token_t u;
                        u.beg = t.iter;
                        u.end = t.iter + 1;
                        u.line = t.line;
                        u.colunm = t.colunm;
                        u.kind = token_t::kind_t::lparen;
                        r.push_back(u);
                    }
                    break;

                case tokenize_phase1::token_t::kind_t::rparen:
                    {
                        token_t u;
                        u.beg = t.iter;
                        u.end = t.iter + 1;
                        u.line = t.line;
                        u.colunm = t.colunm;
                        u.kind = token_t::kind_t::rparen;
                        r.push_back(u);
                    }
                    break;

                case tokenize_phase1::token_t::kind_t::end:
                    {
                        token_t u;
                        u.beg = t.iter;
                        u.end = t.iter;
                        u.line = t.line;
                        u.colunm = t.colunm;
                        u.kind = token_t::kind_t::end;
                        r.push_back(u);
                    }
                    break;
                }
                continue;
            }else if(t.kind == tokenize_phase1::token_t::kind_t::charactor){
                token_t u;
                u.beg = t.iter;
                u.line = t.line;
                u.colunm = t.colunm;
                u.kind = token_t::kind_t::variable;
                while(iter->kind == tokenize_phase1::token_t::kind_t::charactor){
                    ++iter;
                }
                u.end = iter->iter;
                --iter;
                r.push_back(u);
                continue;
            }
        }
        return r;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rsi), %r12
cmpq 0x8(%rsi), %r12
je 0x3fba
movq %rsi, %r14
leaq 0x8(%rsp), %r13
leaq 0x62d1(%rip), %rbp      # 0xa024
movq %rsp, %r15
movl (%r12), %esi
decl %esi
cmpl $0x7, %esi
ja 0x3f9d
movq 0x8(%r12), %rdx
movq 0x10(%r12), %rcx
movq 0x18(%r12), %rax
movslq (%rbp,%rsi,4), %rsi
addq %rbp, %rsi
jmpq *%rsi
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq %rdx, 0x8(%rsp)
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x0, (%rsp)
addq $-0x40, %r12
cmpl $0x1, 0x40(%r12)
leaq 0x20(%r12), %r12
je 0x3da0
movq 0x28(%r12), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x3f7c
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8240
jmp 0x3f9d
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq %rdx, 0x8(%rsp)
incq %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x5, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x3f7c
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8240
jmp 0x3f9d
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq %rdx, 0x8(%rsp)
incq %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x2, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x3f7c
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8240
jmp 0x3f9d
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq %rdx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x6, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x3f7c
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8240
jmp 0x3f9d
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq %rdx, 0x8(%rsp)
incq %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x1, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x3f7c
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8240
jmp 0x3f9d
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq %rdx, 0x8(%rsp)
incq %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x3, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
jne 0x3f7c
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8240
jmp 0x3f9d
cmpl $0x3, 0x20(%r12)
jne 0x3f4c
addq $0x60, %r12
movl -0x20(%r12), %eax
cmpl $0x3, %eax
je 0x3f3f
cmpl $0x8, %eax
jne 0x3f46
jmp 0x3fcc
cmpl $0x7, (%r12)
je 0x3f9d
addq $0x20, %r12
jmp 0x3f2b
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq %rdx, 0x8(%rsp)
incq %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x4, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3fad
movq 0x20(%rsp), %rax
movq %rax, 0x20(%rsi)
movups (%rsp), %xmm0
movups 0x10(%rsp), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
addq $0x28, %rsi
movq %rsi, 0x8(%rbx)
addq $0x20, %r12
cmpq 0x8(%r14), %r12
jne 0x3d56
jmp 0x3fba
movq %rbx, %rdi
movq %r15, %rdx
callq 0x8240
jmp 0x3f9d
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x3130
movq %rax, %r15
movq %rax, %rdi
callq 0x648a
leaq 0xab08(%rip), %rsi      # 0xeaf0
movq 0xafd1(%rip), %rdx      # 0xefc0
movq %r15, %rdi
callq 0x3350
jmp 0x4005
jmp 0x4005
jmp 0x4005
jmp 0x4005
jmp 0x4005
jmp 0x4005
jmp 0x4005
movq %rax, %r14
jmp 0x4015
movq %rax, %r14
movq %r15, %rdi
callq 0x31a0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4022
callq 0x31f0
movq %r14, %rdi
callq 0x3360