// File: fondoger[P]C0-Compiler/src/grammar.cpp
// Function: pReturnStatement()
static void pReturnStatement()
{
    std::string ret_val;
    DataType ret_dtype;

    assert(g_sym == RETURNSY);
    readSymbol();
    test3(Symset({LPARENT, SEMICOLON}));
    if (g_sym == LPARENT) {
        readSymbol();
        pExpression(ret_val, ret_dtype);
        genMidCode(RET, ret_val, NONE, NONE);
        test3(Symset({RPARENT}));
        readSymbol();
    } else {
        ret_dtype = DT_VOID;
        genMidCode(RET, NONE, NONE, NONE);
    }
    if (ret_dtype != current_function_tabEntry.dtype) {
        error(ERR_WRONG_RETURN_TYPE);
    }
    test3(Symset({SEMICOLON}));
    readSymbol();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
leaq -0x20(%rbp), %rdi
callq 0x3450
leaq 0x2d585(%rip), %rax     # 0x4b6b0
cmpl $0xe, (%rax)
jne 0x1e132
jmp 0x1e151
leaq 0x177d3(%rip), %rdi     # 0x3590c
leaq 0x172e8(%rip), %rsi     # 0x35428
movl $0x1b2, %edx            # imm = 0x1B2
leaq 0x177d2(%rip), %rcx     # 0x3591e
callq 0x3230
callq 0x2e050
jmp 0x1e158
jmp 0x1e15a
movl $0x1d, -0x58(%rbp)
movl $0x26, -0x54(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x2, -0x48(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
leaq -0x40(%rbp), %rdi
callq 0x227f0
jmp 0x1e18b
movl $0x22, -0x78(%rbp)
movl $0x26, -0x74(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x70(%rbp)
movq $0x2, -0x68(%rbp)
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x227f0
jmp 0x1e1bc
movq -0x40(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x18170
jmp 0x1e1cb
movl $0x1d, -0x98(%rbp)
movl $0x26, -0x94(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x2, -0x88(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x227f0
jmp 0x1e211
leaq 0x2d498(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x80(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x1e22b
jmp 0x1e252
callq 0x2e050
jmp 0x1e232
movl $0x1, -0x9c(%rbp)
jmp 0x1e5ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1e5c0
jmp 0x1e254
jmp 0x1e256
leaq 0x2d453(%rip), %rax     # 0x4b6b0
cmpl $0x1d, (%rax)
jne 0x1e3c0
callq 0x2e050
jmp 0x1e26d
leaq -0x20(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x1f630
jmp 0x1e27c
movl $0xb, -0xa0(%rbp)
leaq 0x28d73(%rip), %rcx     # 0x47000
leaq -0xa0(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movq %rcx, %rdx
callq 0x26340
jmp 0x1e2a2
jmp 0x1e2a4
movl $0x1e, -0xbc(%rbp)
leaq -0xbc(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq $0x1, -0xb0(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xb0(%rbp), %rdx
leaq -0xa8(%rbp), %rdi
callq 0x227f0
jmp 0x1e2e3
movl $0x22, -0xe0(%rbp)
movl $0x26, -0xdc(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq $0x2, -0xd0(%rbp)
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
leaq -0xc8(%rbp), %rdi
callq 0x227f0
jmp 0x1e32c
movq -0xa8(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x18170
jmp 0x1e341
movl $0x1e, -0xfc(%rbp)
leaq -0xfc(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq $0x1, -0xf0(%rbp)
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
leaq -0xe8(%rbp), %rdi
callq 0x227f0
jmp 0x1e380
leaq 0x2d329(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0xe8(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x1e39d
jmp 0x1e3b3
callq 0x2e050
jmp 0x1e3a4
movl $0x1, -0x9c(%rbp)
jmp 0x1e5ae
jmp 0x1e3b5
jmp 0x1e3b7
callq 0x2e050
jmp 0x1e3be
jmp 0x1e3ee
movl $0x0, -0x24(%rbp)
movl $0xb, -0x100(%rbp)
leaq 0x28c28(%rip), %rcx     # 0x47000
leaq -0x100(%rbp), %rdi
movq %rcx, %rsi
movq %rcx, %rdx
callq 0x26340
jmp 0x1e3ec
jmp 0x1e3ee
movl -0x24(%rbp), %eax
cmpl 0x28c31(%rip), %eax     # 0x47028
je 0x1e48b
leaq -0x121(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x3570
movq -0x190(%rbp), %rdx
leaq 0x17518(%rip), %rsi     # 0x35936
leaq -0x120(%rbp), %rdi
callq 0x3440
jmp 0x1e42c
leaq -0x120(%rbp), %rdi
callq 0x18620
jmp 0x1e43a
leaq -0x120(%rbp), %rdi
callq 0x35e8
leaq -0x121(%rbp), %rdi
callq 0x3370
jmp 0x1e48b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1e47a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x35e8
leaq -0x121(%rbp), %rdi
callq 0x3370
jmp 0x1e5c0
jmp 0x1e48d
movl $0x26, -0x144(%rbp)
leaq -0x144(%rbp), %rax
movq %rax, -0x140(%rbp)
movq $0x1, -0x138(%rbp)
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
leaq -0x130(%rbp), %rdi
callq 0x227f0
jmp 0x1e4cc
movl $0x22, -0x168(%rbp)
movl $0x26, -0x164(%rbp)
leaq -0x168(%rbp), %rax
movq %rax, -0x160(%rbp)
movq $0x2, -0x158(%rbp)
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
leaq -0x150(%rbp), %rdi
callq 0x227f0
jmp 0x1e515
movq -0x130(%rbp), %rdi
movq -0x150(%rbp), %rsi
callq 0x18170
jmp 0x1e52a
movl $0x26, -0x184(%rbp)
leaq -0x184(%rbp), %rax
movq %rax, -0x180(%rbp)
movq $0x1, -0x178(%rbp)
movq -0x180(%rbp), %rsi
movq -0x178(%rbp), %rdx
leaq -0x170(%rbp), %rdi
callq 0x227f0
jmp 0x1e569
leaq 0x2d140(%rip), %rax     # 0x4b6b0
movl (%rax), %esi
leaq -0x170(%rbp), %rdi
callq 0x18b40
xorb $-0x1, %al
testb $0x1, %al
jne 0x1e586
jmp 0x1e599
callq 0x2e050
jmp 0x1e58d
movl $0x1, -0x9c(%rbp)
jmp 0x1e5ae
jmp 0x1e59b
jmp 0x1e59d
callq 0x2e050
jmp 0x1e5a4
movl $0x0, -0x9c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x35e8
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x35e8
movq -0x30(%rbp), %rdi
callq 0x3560
nopw %cs:(%rax,%rax)