// File: 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:
subq $0x148, %rsp            # imm = 0x148
movq %rsi, 0x138(%rsp)
movq %rdi, 0x130(%rsp)
leaq 0x128(%rsp), %rdi
callq 0xc6d0
movq 0x138(%rsp), %rax
movq %rax, 0x120(%rsp)
movq $0x0, 0x118(%rsp)
leaq 0x110(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xc6f0
jmp 0x7d43
leaq 0x118(%rsp), %rax
movq %rax, 0xf8(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x100(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x108(%rsp)
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x1, (%rax)
jne 0x7f67
movl $0x28, %edi
callq 0x5380
movq %rax, 0x78(%rsp)
jmp 0x7d9a
movq 0x78(%rsp), %rdi
callq 0xc630
jmp 0x7da6
movq 0x78(%rsp), %rax
movq %rax, 0xf0(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xf0(%rsp), %rsi
movq 0xd0(%rsp), %rdi
callq 0x8740
movq %rax, 0x70(%rsp)
jmp 0x7ddf
movq 0x70(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0x130(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0xba80
movq 0x120(%rsp), %rax
movq %rax, 0x128(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xc2c0
testb $0x1, %al
jne 0x7e3c
jmp 0x7e7d
jmp 0x83f9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x849b
movq 0x78(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
callq 0x5350
jmp 0x849b
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x3, (%rax)
jne 0x7f3c
leaq 0x120(%rsp), %rdi
callq 0xc270
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x6, (%rax)
jne 0x7ebf
leaq 0x128(%rsp), %rdi
callq 0xc270
cmpq $0x0, 0x118(%rsp)
je 0x7f37
movq 0x118(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x130(%rsp), %rsi
leaq 0xc8(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0xbf40
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0xc510
jmp 0x7f02
leaq 0xc8(%rsp), %rdi
callq 0xbee0
jmp 0x7f37
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0xbee0
jmp 0x849b
jmp 0x83f9
leaq 0xf8(%rsp), %rdi
callq 0x8d50
jmp 0x7f4b
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x5, (%rax)
jne 0x7f62
jmp 0x83f9
jmp 0x83f4
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x0, (%rax)
jne 0x812f
movl $0x28, %edi
callq 0x5380
movq %rax, 0x58(%rsp)
jmp 0x7f8e
movq 0x58(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
callq 0xc540
movq 0x58(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xc0(%rsp), %rsi
movq 0xb0(%rsp), %rdi
callq 0x8950
movq %rax, 0x50(%rsp)
jmp 0x7fe3
movq 0x50(%rsp), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x120(%rsp)
movq 0x130(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0xba80
movq 0x120(%rsp), %rax
movq %rax, 0x128(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xc2c0
testb $0x1, %al
jne 0x8040
jmp 0x8045
jmp 0x83f9
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x3, (%rax)
jne 0x8104
leaq 0x120(%rsp), %rdi
callq 0xc270
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x6, (%rax)
jne 0x8087
leaq 0x128(%rsp), %rdi
callq 0xc270
cmpq $0x0, 0x118(%rsp)
je 0x80ff
movq 0x118(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x130(%rsp), %rsi
leaq 0xa8(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0xbf40
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0xc510
jmp 0x80ca
leaq 0xa8(%rsp), %rdi
callq 0xbee0
jmp 0x80ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0xbee0
jmp 0x849b
jmp 0x83f9
leaq 0xf8(%rsp), %rdi
callq 0x8d50
jmp 0x8113
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x5, (%rax)
jne 0x812a
jmp 0x83f9
jmp 0x83f2
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x4, (%rax)
jne 0x83bc
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x4, (%rax)
jne 0x82db
leaq 0x120(%rsp), %rdi
callq 0xc270
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xc290
movq 0x30(%rsp), %rdi
movq 0x120(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rsi
callq 0x7cf0
movq %rax, 0x38(%rsp)
jmp 0x81a3
movq 0x38(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x98(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xc490
testb $0x1, %al
jne 0x81ce
jmp 0x82ba
movq 0x98(%rsp), %rax
movq %rax, 0x120(%rsp)
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x5, (%rax)
jne 0x824a
leaq 0x98(%rsp), %rdi
callq 0xc270
leaq 0x120(%rsp), %rdi
callq 0xc270
movq 0x130(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0xbbc0
movq 0x98(%rsp), %rax
movq %rax, 0x128(%rsp)
jmp 0x82b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x82c9
movl $0x10, %edi
callq 0x5180
movq %rax, 0x28(%rsp)
movq %rax, 0x20(%rsp)
leaq 0x138(%rsp), %rdi
callq 0xc1d0
movq 0x28(%rsp), %rdi
movq 0x18(%rax), %rsi
callq 0xc3c0
jmp 0x827b
movq 0x20(%rsp), %rdi
leaq 0x1d679(%rip), %rsi     # 0x25900
leaq 0x41f2(%rip), %rdx      # 0xc480
callq 0x5590
jmp 0x84b5
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
callq 0x52a0
jmp 0x82c9
jmp 0x82ba
leaq 0xa0(%rsp), %rdi
callq 0xbee0
jmp 0x82db
leaq 0xa0(%rsp), %rdi
callq 0xbee0
jmp 0x849b
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x3, (%rax)
jne 0x8397
leaq 0x120(%rsp), %rdi
callq 0xc270
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x6, (%rax)
jne 0x831d
leaq 0x128(%rsp), %rdi
callq 0xc270
cmpq $0x0, 0x118(%rsp)
je 0x8395
movq 0x118(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x130(%rsp), %rsi
leaq 0x88(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xbf40
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xc510
jmp 0x8360
leaq 0x88(%rsp), %rdi
callq 0xbee0
jmp 0x8395
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0x88(%rsp), %rdi
callq 0xbee0
jmp 0x849b
jmp 0x83f9
leaq 0xf8(%rsp), %rdi
callq 0x8d50
jmp 0x83a6
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x5, (%rax)
jne 0x83ba
jmp 0x83f9
jmp 0x83f0
leaq 0x120(%rsp), %rdi
callq 0xc1d0
cmpl $0x3, (%rax)
je 0x83ee
movq 0x138(%rsp), %rax
movq %rax, 0x140(%rsp)
movl $0x1, 0x84(%rsp)
jmp 0x847e
jmp 0x83f0
jmp 0x83f2
jmp 0x83f4
jmp 0x7d41
cmpq $0x0, 0x118(%rsp)
je 0x8463
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
callq 0xbba0
cmpq $0x1, %rax
je 0x8432
movq 0x130(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0xbbc0
jmp 0x8461
movq 0x130(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x118(%rsp), %rdi
addq $0x8, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xbbf0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0xbbc0
jmp 0x8463
movq 0x128(%rsp), %rax
movq %rax, 0x140(%rsp)
movl $0x1, 0x84(%rsp)
leaq 0x110(%rsp), %rdi
callq 0xbee0
movq 0x140(%rsp), %rax
addq $0x148, %rsp            # imm = 0x148
retq
leaq 0x110(%rsp), %rdi
callq 0xbee0
movq 0xe8(%rsp), %rdi
callq 0x55c0
nopw %cs:(%rax,%rax)