// File: sighingnow[P]compile-pascal/pl0_parser.cpp
// Function: pl0_const_fn(input_t*)
pair<int, pl0_ast_constv *> pl0_const_fn(input_t *text) {
    auto res1 = (spaces >> (pl0_character('+') | pl0_character('-')) << spaces)(text);
    pair<int, pl0_ast_constv *> ans;
    if (std::get<0>(res1) != -1) {
        int flag = std::get<1>(res1) == '+' ? (1) : (-1);
        auto res2 = pl0_unsigned(text->drop(std::get<0>(res1)));
        ans = make_pair(
            std::get<0>(res2) == -1 ? -1 : (std::get<0>(res1) + std::get<0>(res2)),
            new pl0_ast_constv(text->locate(), std::get<1>(res2)->val * flag, pl0_ast_constv::INT)
        );
    }
    else {
        auto res = (pl0_unsigned | pl0_char)(text);
        ans = make_pair(std::get<0>(res), new pl0_ast_constv(text->locate(), std::get<1>(res) ? std::get<1>(res)->val : 0, std::get<1>(res) ? std::get<1>(res)->dt : pl0_ast_constv::INT));
    }
    if (verbose) {
        cout << "parsing: Constant" << endl;
    }
    return ans;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x590, %rsp            # imm = 0x590
movq %rdi, -0x18(%rbp)
movb $0x2b, -0x371(%rbp)
leaq -0x370(%rbp), %rdi
leaq -0x371(%rbp), %rsi
callq 0xa240
movb $0x2d, -0x3c1(%rbp)
leaq -0x3c0(%rbp), %rdi
leaq -0x3c1(%rbp), %rsi
callq 0xa240
jmp 0xbc65
leaq -0x328(%rbp), %rdi
leaq -0x370(%rbp), %rsi
leaq -0x3c0(%rbp), %rdx
callq 0x1c670
jmp 0xbc81
leaq 0x153b48(%rip), %rsi    # 0x15f7d0
leaq -0x298(%rbp), %rdi
leaq -0x328(%rbp), %rdx
callq 0x1c630
jmp 0xbc9d
leaq 0x153b2c(%rip), %rdx    # 0x15f7d0
leaq -0x1a0(%rbp), %rdi
leaq -0x298(%rbp), %rsi
callq 0x1c5f0
jmp 0xbcb9
movq -0x18(%rbp), %rdx
leaq -0x40(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x1c6b0
jmp 0xbccf
leaq -0x1a0(%rbp), %rdi
callq 0x1c9c0
leaq -0x298(%rbp), %rdi
callq 0x1c9f0
leaq -0x328(%rbp), %rdi
callq 0x1ca20
leaq -0x3c0(%rbp), %rdi
callq 0x19a20
leaq -0x370(%rbp), %rdi
callq 0x19a20
leaq -0x10(%rbp), %rdi
callq 0x1ca50
jmp 0xbd16
leaq -0x40(%rbp), %rdi
callq 0x1b380
cmpl $-0x1, (%rax)
je 0xbfc3
leaq -0x40(%rbp), %rdi
movq %rdi, -0x528(%rbp)
callq 0x1b3a0
movq -0x528(%rbp), %rdi
movb (%rax), %al
subb $0x2b, %al
sete %al
movzbl %al, %ecx
movl %ecx, %eax
leal -0x1(%rax,%rax), %eax
movl %eax, -0x3d8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x520(%rbp)
callq 0x1b380
movq -0x520(%rbp), %rdi
movq %rax, %rsi
callq 0x1cb50
movq %rax, -0x518(%rbp)
jmp 0xbd7d
movq -0x518(%rbp), %rdx
leaq 0x153edd(%rip), %rsi    # 0x15fc68
leaq -0x408(%rbp), %rdi
callq 0x1ca70
jmp 0xbd99
leaq -0x408(%rbp), %rdi
callq 0x1ce40
cmpl $-0x1, (%rax)
jne 0xbdb7
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x52c(%rbp)
jmp 0xbde5
leaq -0x40(%rbp), %rdi
callq 0x1b380
movl (%rax), %eax
movl %eax, -0x530(%rbp)
leaq -0x408(%rbp), %rdi
callq 0x1ce40
movq %rax, %rcx
movl -0x530(%rbp), %eax
addl (%rcx), %eax
movl %eax, -0x52c(%rbp)
movl -0x52c(%rbp), %eax
movl %eax, -0x41c(%rbp)
movl $0x10, %edi
callq 0x5340
movq %rax, -0x538(%rbp)
jmp 0xbe04
movq -0x18(%rbp), %rdi
callq 0x1a350
movq %rax, -0x540(%rbp)
jmp 0xbe16
movq -0x540(%rbp), %rax
movq %rax, -0x430(%rbp)
leaq -0x408(%rbp), %rdi
callq 0x1ce60
movq -0x538(%rbp), %rdi
movq (%rax), %rax
movl 0x8(%rax), %edx
movl -0x3d8(%rbp), %eax
imull %eax, %edx
movq -0x430(%rbp), %rsi
xorl %ecx, %ecx
callq 0x1b9e0
jmp 0xbe56
movq -0x538(%rbp), %rax
movq %rax, -0x428(%rbp)
leaq -0x41c(%rbp), %rdi
leaq -0x428(%rbp), %rsi
callq 0x1ce10
movq %rdx, -0x550(%rbp)
movl %eax, -0x544(%rbp)
jmp 0xbe86
movq -0x550(%rbp), %rax
movl -0x544(%rbp), %ecx
movl %ecx, -0x418(%rbp)
movq %rax, -0x410(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x1ce80
leaq -0x408(%rbp), %rdi
callq 0x1ceb0
jmp 0xc1b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3d0(%rbp)
movl %eax, -0x3d4(%rbp)
jmp 0xbf53
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3d0(%rbp)
movl %eax, -0x3d4(%rbp)
jmp 0xbf47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3d0(%rbp)
movl %eax, -0x3d4(%rbp)
jmp 0xbf3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3d0(%rbp)
movl %eax, -0x3d4(%rbp)
jmp 0xbf2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3d0(%rbp)
movl %eax, -0x3d4(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x1c9c0
leaq -0x298(%rbp), %rdi
callq 0x1c9f0
leaq -0x328(%rbp), %rdi
callq 0x1ca20
leaq -0x3c0(%rbp), %rdi
callq 0x19a20
leaq -0x370(%rbp), %rdi
callq 0x19a20
jmp 0xc211
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3d0(%rbp)
movl %eax, -0x3d4(%rbp)
jmp 0xc208
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3d0(%rbp)
movl %eax, -0x3d4(%rbp)
jmp 0xbfb2
movq -0x538(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3d0(%rbp)
movl %eax, -0x3d4(%rbp)
movl $0x10, %esi
callq 0x5350
leaq -0x408(%rbp), %rdi
callq 0x1ceb0
jmp 0xc208
leaq 0x153c9e(%rip), %rsi    # 0x15fc68
leaq 0x153c07(%rip), %rdx    # 0x15fbd8
leaq -0x4f0(%rbp), %rdi
callq 0x1ced0
jmp 0xbfdf
movq -0x18(%rbp), %rdx
leaq -0x460(%rbp), %rdi
leaq -0x4f0(%rbp), %rsi
callq 0x1cf10
jmp 0xbff8
leaq -0x4f0(%rbp), %rdi
callq 0x1d170
leaq -0x460(%rbp), %rdi
callq 0x1ce40
movq %rax, -0x560(%rbp)
movl $0x10, %edi
callq 0x5340
movq %rax, -0x558(%rbp)
jmp 0xc02a
movq -0x18(%rbp), %rdi
callq 0x1a350
movq %rax, -0x568(%rbp)
jmp 0xc03c
movq -0x568(%rbp), %rax
movq %rax, -0x510(%rbp)
leaq -0x460(%rbp), %rdi
callq 0x1ce60
cmpq $0x0, (%rax)
je 0xc076
leaq -0x460(%rbp), %rdi
callq 0x1ce60
movq (%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x56c(%rbp)
jmp 0xc080
xorl %eax, %eax
movl %eax, -0x56c(%rbp)
jmp 0xc080
movl -0x56c(%rbp), %eax
movl %eax, -0x570(%rbp)
leaq -0x460(%rbp), %rdi
callq 0x1ce60
cmpq $0x0, (%rax)
je 0xc0b8
leaq -0x460(%rbp), %rdi
callq 0x1ce60
movq (%rax), %rax
movl 0xc(%rax), %eax
movl %eax, -0x574(%rbp)
jmp 0xc0c2
xorl %eax, %eax
movl %eax, -0x574(%rbp)
jmp 0xc0c2
movl -0x570(%rbp), %edx
movq -0x558(%rbp), %rdi
movl -0x574(%rbp), %ecx
movq -0x510(%rbp), %rsi
callq 0x1b9e0
jmp 0xc0e3
movq -0x560(%rbp), %rdi
movq -0x558(%rbp), %rax
movq %rax, -0x508(%rbp)
leaq -0x508(%rbp), %rsi
callq 0x1b970
movq %rdx, -0x580(%rbp)
movl %eax, -0x578(%rbp)
jmp 0xc113
movq -0x580(%rbp), %rax
movl -0x578(%rbp), %ecx
movl %ecx, -0x500(%rbp)
movq %rax, -0x4f8(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x500(%rbp), %rsi
callq 0x1ce80
leaq -0x460(%rbp), %rdi
callq 0x1ceb0
jmp 0xc1b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3d0(%rbp)
movl %eax, -0x3d4(%rbp)
leaq -0x4f0(%rbp), %rdi
callq 0x1d170
jmp 0xc208
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3d0(%rbp)
movl %eax, -0x3d4(%rbp)
jmp 0xc1a5
movq -0x558(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x3d0(%rbp)
movl %eax, -0x3d4(%rbp)
movl $0x10, %esi
callq 0x5350
leaq -0x460(%rbp), %rdi
callq 0x1ceb0
jmp 0xc208
testb $0x1, 0x15367e(%rip)    # 0x15f838
je 0xc1ef
movq 0x152e15(%rip), %rdi    # 0x15efd8
leaq 0xe303d(%rip), %rsi     # 0xef207
callq 0x5330
movq %rax, -0x588(%rbp)
jmp 0xc1d8
movq -0x588(%rbp), %rdi
movq 0x152dda(%rip), %rsi    # 0x15efc0
callq 0x53a0
jmp 0xc1ed
jmp 0xc1ef
leaq -0x40(%rbp), %rdi
callq 0x1b3f0
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rdx
addq $0x590, %rsp            # imm = 0x590
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x1b3f0
movq -0x3d0(%rbp), %rdi
callq 0x55b0
nopl (%rax)