// File: pfnet-research[P]pml/src/parser.cpp
// Function: parser::and_expr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&)
expr_result_t and_expr(std::string const& input, size_t& pos) {
    auto head_result = equive_expr(input, pos);
    if (head_result.is_error())
        return head_result;
    auto acc = head_result.ok();

    while (true) {
        auto op_token = next_token(input, pos);
        if (op_token.kind != token_t::kind_t::And)
            break;
        pos = op_token.pos + op_token.lexime.size();

        auto e_result = equive_expr(input, pos);
        if (e_result.is_error())
            return e_result;
        acc = make<ast::and_expr_t>(acc, e_result.ok());
    }
    return acc;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0xd8(%rbp)
movq %rdi, %rax
movq %rax, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x50(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x3f0f0
movq -0xc8(%rbp), %rdi
callq 0x41970
movb %al, -0xb9(%rbp)
jmp 0x3f674
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0x3f680
jmp 0x3f6af
movq -0xd8(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x41990
jmp 0x3f692
movl $0x1, -0x60(%rbp)
jmp 0x3f88a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3f8a3
leaq -0x50(%rbp), %rdi
callq 0x419e0
movq %rax, -0xe0(%rbp)
jmp 0x3f6c1
movq -0xe0(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x13050
jmp 0x3f6d3
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x355b0
jmp 0x3f6ec
cmpl $0x22, -0xa0(%rbp)
je 0x3f712
movl $0x3, -0x60(%rbp)
jmp 0x3f820
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3f87f
movq -0x98(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0x90(%rbp), %rdi
callq 0xa280
movq -0xe8(%rbp), %rcx
movq -0xd8(%rbp), %rdi
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0xa1(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3f0f0
jmp 0x3f75a
movq -0xd8(%rbp), %rdi
callq 0x41970
movb %al, -0xe9(%rbp)
jmp 0x3f76e
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0x3f77a
jmp 0x3f7b8
movb $0x1, -0xa1(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0x3f809
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x3f84d
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
callq 0x2ffa0
jmp 0x3f84d
movq -0xd8(%rbp), %rdi
callq 0x419e0
movq %rax, -0xf8(%rbp)
jmp 0x3f7cd
movq -0xf8(%rbp), %rdx
leaq -0xb8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x3f8c0
jmp 0x3f7e6
leaq -0x70(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x422f0
leaq -0xb8(%rbp), %rdi
callq 0x42320
movl $0x0, -0x60(%rbp)
testb $0x1, -0xa1(%rbp)
jne 0x3f81e
movq -0xd8(%rbp), %rdi
callq 0x2ffa0
jmp 0x3f820
leaq -0xa0(%rbp), %rdi
callq 0x404f0
movl -0x60(%rbp), %eax
movl %eax, -0xfc(%rbp)
testl %eax, %eax
je 0x3f848
jmp 0x3f83b
movl -0xfc(%rbp), %eax
subl $0x3, %eax
je 0x3f85b
jmp 0x3f874
jmp 0x3f6d1
leaq -0xa0(%rbp), %rdi
callq 0x404f0
jmp 0x3f87f
movq -0xd8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x41f90
jmp 0x3f86d
movl $0x1, -0x60(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x13080
jmp 0x3f88a
leaq -0x70(%rbp), %rdi
callq 0x13080
jmp 0x3f8a3
leaq -0x50(%rbp), %rdi
callq 0x2ffa0
movq -0xd0(%rbp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
leaq -0x50(%rbp), %rdi
callq 0x2ffa0
movq -0x58(%rbp), %rdi
callq 0xa650
nopw %cs:(%rax,%rax)