// File: /workspace/github_cpp_makefile_star2_O1/pfnet-research[P]pml/src/parser.cpp
// Function: parser::multive_expr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long&)
expr_result_t multive_expr(std::string const& input, size_t& pos) {
    auto head_result = applicative_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::Star && op_token.kind != token_t::kind_t::Slash)
            break;
        pos = op_token.pos + op_token.lexime.size();

        auto e_result = applicative_expr(input, pos);
        if (e_result.is_error())
            return e_result;
        auto e = e_result.ok();

        switch (op_token.kind) {
        case token_t::kind_t::Star:
            acc = make<ast::mul_expr_t>(acc, e);
            break;
        case token_t::kind_t::Slash:
            acc = make<ast::div_expr_t>(acc, e);
            break;
        default:
            throw std::logic_error{"invalid additive op"};
        }
    }
    return acc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x80(%rsp), %r12
movq %r12, %rdi
callq 0x2359b
movb 0x30(%r12), %al
testb %al, %al
je 0x23817
leaq 0x80(%rsp), %rdi
callq 0x24ee2
movq (%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x23883
movq 0x3f7a3(%rip), %rcx     # 0x62fb0
cmpb $0x0, (%rcx)
je 0x2387f
incl 0x8(%rax)
jmp 0x23883
movb %al, 0x30(%rbx)
leaq 0xa0(%rsp), %rax
movups -0x20(%rax), %xmm0
movups %xmm0, (%rbx)
leaq 0x20(%rbx), %rcx
movq %rcx, 0x10(%rbx)
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x2384c
movq %rdx, 0x10(%rbx)
movq 0xa0(%rsp), %rcx
movq %rcx, 0x20(%rbx)
jmp 0x23852
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x98(%rsp), %rcx
movq %rcx, 0x18(%rbx)
movq %rax, 0x90(%rsp)
movq $0x0, 0x98(%rsp)
movb $0x0, 0xa0(%rsp)
jmp 0x23a2d
lock
incl 0x8(%rax)
leaq 0x70(%rsp), %rbp
leaq 0x50(%rsp), %r13
movq %rbx, 0x38(%rsp)
movq (%r14), %rdx
movq %r13, %rdi
movq %r15, %rsi
callq 0x1bcc7
movl 0x50(%rsp), %eax
addl $-0x12, %eax
movl $0x3, %r12d
cmpl $-0x2, %eax
jb 0x239d3
movq 0x68(%rsp), %rax
addq 0x58(%rsp), %rax
movq %rax, (%r14)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2359b
movb 0x30(%rbx), %bl
movl $0x1, %r12d
testb %bl, %bl
je 0x239bb
movq 0x38(%rsp), %rdi
callq 0x24ee2
movq (%rax), %rcx
movq %rcx, 0x40(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x23917
movq 0x3f6a7(%rip), %rcx     # 0x62fb0
cmpb $0x0, (%rcx)
je 0x23913
incl 0x8(%rax)
jmp 0x23917
lock
incl 0x8(%rax)
movl 0x50(%rsp), %eax
cmpl $0x10, %eax
je 0x23952
cmpl $0x11, %eax
jne 0x23a4f
movq $0x0, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x40(%rsp), %r8
callq 0x26a50
jmp 0x23979
movq $0x0, 0x20(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x40(%rsp), %r8
callq 0x26826
movaps 0x20(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x20(%rsp)
movq 0x18(%rsp), %rdi
movups %xmm0, 0x10(%rsp)
testq %rdi, %rdi
je 0x2399a
callq 0xaa12
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x239a9
callq 0xaa12
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x239b8
callq 0xaa12
xorl %r12d, %r12d
testb %bl, %bl
je 0x239ce
movq 0x38(%rsp), %rbx
movq %rbx, %rdi
callq 0x1a10e
jmp 0x239d3
movq 0x38(%rsp), %rbx
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x239ea
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x92e0
testl %r12d, %r12d
je 0x23892
cmpl $0x3, %r12d
jne 0x23a1e
movb $0x1, 0x30(%rbx)
movq 0x10(%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x18(%rsp), %rcx
movq %rax, 0x18(%rsp)
movq %rcx, 0x8(%rbx)
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x23a2d
callq 0xaa12
leaq 0x80(%rsp), %rdi
callq 0x1a10e
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x9150
movq %rax, %r15
leaq 0x248ad(%rip), %rsi     # 0x48310
movq %rax, %rdi
callq 0x93c0
movq 0x3f55e(%rip), %rsi     # 0x62fd0
movq 0x3f52f(%rip), %rdx     # 0x62fa8
movq %r15, %rdi
callq 0x94b0
movq %rax, %r14
jmp 0x23ae8
jmp 0x23a97
movq %rax, %r14
movq %r15, %rdi
callq 0x9200
jmp 0x23a9a
jmp 0x23a97
movq %rax, %r14
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x23aae
callq 0xaa12
jmp 0x23aae
movq %rax, %r14
movq 0x38(%rsp), %rdi
callq 0x1a10e
jmp 0x23abd
movq %rax, %r14
movq 0x60(%rsp), %rdi
cmpq %rbp, %rdi
je 0x23ad9
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x92e0
jmp 0x23ad9
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x23ae8
callq 0xaa12
leaq 0x80(%rsp), %rdi
callq 0x1a10e
movq %r14, %rdi
callq 0x94e0