// File: /workspace/github_cpp_makefile_star2_O2/pointwiseproduct[P]untyped_lambda/untyped_lambda.cpp
// Function: parsing_phase::expr(std::unique_ptr<internal_data::expr, std::default_delete<internal_data::expr>>&, __gnu_cxx::__normal_iterator<tokenize_phase2::token_t const*, std::vector<tokenize_phase2::token_t, std::allocator<tokenize_phase2::token_t>>>)
token_seq_type::const_iterator expr(std::unique_ptr<internal_data::expr> &e, token_seq_type::const_iterator first){
        token_seq_type::const_iterator r;
        token_seq_type::const_iterator iter = first;
        internal_data::sequence *seq = nullptr;
        std::unique_ptr<internal_data::expr> seq_expr(nullptr);
        while(true){
            auto case_seq_new = [&](){
                if(!seq){
                    seq_expr.reset(new internal_data::sequence());
                    seq = static_cast<internal_data::sequence*>(seq_expr.get());
                }
                seq->push_back(std::move(e));
            };

            if(iter->kind == kind_t::lambda){
                internal_data::lambda *ptr = new internal_data::lambda();
                iter = lambda(iter, *ptr);
                e.reset(ptr);
                r = iter;
                if(iter == first){
                    break;
                }

                if(iter->kind == kind_t::dot){
                    ++iter;
                    if(iter->kind == kind_t::end){
                        ++r;
                    }
                    if(seq){
                        seq->push_back(std::move(e));
                    }
                    break;
                }
                case_seq_new();
                if(iter->kind == kind_t::rparen){
                    break;
                }
            }else if(iter->kind == kind_t::variable){
                internal_data::variable *ptr = new internal_data::variable();
                iter = variable(iter, *ptr);
                e.reset(ptr);
                r = iter;
                if(iter == first){
                    break;
                }

                if(iter->kind == kind_t::dot){
                    ++iter;
                    if(iter->kind == kind_t::end){
                        ++r;
                    }
                    if(seq){
                        seq->push_back(std::move(e));
                    }
                    break;
                }
                case_seq_new();
                if(iter->kind == kind_t::rparen){
                    break;
                }
            }else if(iter->kind == kind_t::lparen){
                if(iter->kind == kind_t::lparen){
                    ++iter;
                    std::unique_ptr<internal_data::expr> f;
                    token_seq_type::const_iterator s = expr(f, iter);
                    if(s != first){
                        iter = s;
                        if(iter->kind == kind_t::rparen){
                            ++s;
                            ++iter;
                            e.swap(f);
                            r = s;
                        }else{
                            throw parsing_error(first->line);
                        }
                    }
                }

                if(iter->kind == kind_t::dot){
                    ++iter;
                    if(iter->kind == kind_t::end){
                        ++r;
                    }
                    if(seq){
                        seq->push_back(std::move(e));
                    }
                    break;
                }
                case_seq_new();
                if(iter->kind == kind_t::rparen){
                    break;
                }
            }else if(iter->kind != kind_t::dot){
                return first;
            }
        }
        if(seq){
            if(seq->vec.size() != 1){
                e.swap(seq_expr);
            }else{
                e.swap(seq->vec[0]);
            }
        }
        return r;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0x10(%rsp), %rax
andq $0x0, (%rax)
leaq 0x8(%rsp), %rax
andq $0x0, (%rax)
xorl %r15d, %r15d
leaq 0x4cd4(%rip), %r13      # 0x9044
movq %rsi, %r14
leaq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq %rbx, 0x40(%rsp)
movl (%r14), %eax
cmpq $0x4, %rax
ja 0x450d
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
pushq $0x28
popq %rdi
callq 0x3220
movq %rax, %r12
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rax)
andq $0x0, 0x20(%rax)
leaq 0x98d7(%rip), %rax      # 0xdc98
movq %rax, (%r12)
movq %r12, %rax
addq $0x18, %rax
movq %rax, 0x8(%r12)
movb $0x0, 0x18(%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0x4971
movq %rax, %r15
movq (%rbx), %rdi
movq %r12, (%rbx)
testq %rdi, %rdi
je 0x43f6
movq (%rdi), %rax
callq *0x38(%rax)
cmpq %rbp, %r15
je 0x44e1
cmpl $0x3, (%r15)
je 0x458b
leaq 0x30(%rsp), %rdi
callq 0x4b04
jmp 0x449f
addq $0x28, %r14
andq $0x0, (%rsp)
movq %rsp, %rdi
movq %r14, %rsi
callq 0x4340
cmpq %rbp, %rax
je 0x44ad
cmpl $0x5, (%rax)
jne 0x4627
addq $0x28, %rax
movq (%rbx), %rdi
movq (%rsp), %rcx
movq %rcx, (%rbx)
movq %rdi, (%rsp)
movq %rax, %r15
movq %rax, %r14
jmp 0x44b1
pushq $0x28
popq %rdi
callq 0x3220
movq %rax, %r12
movq %rax, %rdi
callq 0x5b52
movq %r14, %rdi
movq %r12, %rsi
callq 0x487e
movq %rax, %r15
movq (%rbx), %rdi
movq %r12, (%rbx)
testq %rdi, %rdi
je 0x4486
movq (%rdi), %rax
callq *0x38(%rax)
cmpq %rbp, %r15
je 0x44e1
cmpl $0x3, (%r15)
je 0x45d9
leaq 0x30(%rsp), %rdi
callq 0x4b04
cmpl $0x5, (%r15)
movq %r15, %r14
pushq $0x3
popq %rax
jne 0x44d2
jmp 0x44d4
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x44bc
movq (%rdi), %rax
callq *0x38(%rax)
cmpl $0x3, (%r14)
je 0x4541
leaq 0x30(%rsp), %rdi
callq 0x4b04
cmpl $0x5, (%r14)
je 0x44e1
xorl %eax, %eax
testl %eax, %eax
je 0x4373
cmpl $0x3, %eax
jne 0x450d
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
je 0x4508
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rcx
subq %rax, %rcx
movq (%rbx), %rdi
cmpq $0x8, %rcx
jne 0x4517
movq (%rax), %rcx
movq %rcx, (%rbx)
movq %rdi, (%rax)
movq %r15, %rbp
jmp 0x450d
movq 0x8(%rsp), %rdi
movq %rbp, %r15
jmp 0x4524
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
movq %rdi, 0x8(%rsp)
testq %rdi, %rdi
je 0x452f
movq (%rdi), %rax
callq *0x38(%rax)
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28(%r15), %rax
cmpl $0x6, 0x28(%r14)
cmoveq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x44e1
movq (%rbx), %rax
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, (%rbx)
addq $0x8, %rdi
callq 0x76f2
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x4580
movq (%rdi), %rax
callq *0x38(%rax)
andq $0x0, 0x18(%rsp)
jmp 0x44e1
leaq 0x28(%r15), %rax
cmpl $0x6, 0x28(%r15)
cmoveq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x44e1
movq (%rbx), %rax
leaq 0x20(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, (%rbx)
addq $0x8, %rdi
callq 0x76f2
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x45ce
movq (%rdi), %rax
callq *0x38(%rax)
andq $0x0, 0x20(%rsp)
jmp 0x44e1
leaq 0x28(%r15), %rax
cmpl $0x6, 0x28(%r15)
cmoveq %rax, %r15
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x44e1
movq (%rbx), %rax
leaq 0x28(%rsp), %rsi
movq %rax, (%rsi)
andq $0x0, (%rbx)
addq $0x8, %rdi
callq 0x76f2
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x461c
movq (%rdi), %rax
callq *0x38(%rax)
andq $0x0, 0x28(%rsp)
jmp 0x44e1
pushq $0x10
popq %rdi
callq 0x3150
movq %rax, %r14
movq 0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x5a8c
leaq 0x94c3(%rip), %rsi      # 0xdb08
movq 0x9974(%rip), %rdx      # 0xdfc0
movq %r14, %rdi
callq 0x3360
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4667
movq (%rdi), %rax
callq *0x38(%rax)
andq $0x0, 0x28(%rsp)
jmp 0x46e0
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x4682
movq (%rdi), %rax
callq *0x38(%rax)
andq $0x0, 0x20(%rsp)
jmp 0x46e0
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x469d
movq (%rdi), %rax
callq *0x38(%rax)
andq $0x0, 0x18(%rsp)
jmp 0x46e0
jmp 0x46b6
movq %rax, %rbx
movq %r14, %rdi
callq 0x31b0
jmp 0x46b9
jmp 0x46dd
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x46e0
movq (%rdi), %rax
callq *0x38(%rax)
jmp 0x46e0
jmp 0x46dd
movq %rax, %rbx
movq %r12, %rdi
callq 0x3200
jmp 0x46e0
jmp 0x46dd
jmp 0x46dd
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x46f0
movq (%rdi), %rax
callq *0x38(%rax)
movq %rbx, %rdi
callq 0x3370