// File: /workspace/github_c_makefile_star2_O0/ryvnf[P]czc/parse.c
// Function: parse_postfix_expr
static struct ast *parse_postfix_expr(struct parse *parse)
{
    struct ast *expr = parse_primary_expr(parse);
    if (expr == NULL)
        return expr;

    for (;;) {
	struct loc *line = get_linenr(parse);
        switch (peek_tok(parse)->type) {
            case DEC_TOK: {
                parse->pos++;
                expr = ast_new_ast(line, POST_DEC_EXPR, 1, expr);
                continue;
            }
            case INC_TOK: {
                parse->pos++;
                expr = ast_new_ast(line, POST_INC_EXPR, 1, expr);
                continue;
            }
            case '^': {
                parse->pos++;
                expr = ast_new_ast(line, DEREF_EXPR, 1, expr);
                continue;
            }
            case '[': {
                struct ast *expr2 = parse_enclosed(parse, '[', parse_expr, ']', false);
                if (expr2 == NULL)
                    goto err;

                expr = ast_new_ast(line, SUBSCR_EXPR, 2, expr, expr2);
                continue;
            }
            case '(': {
                struct ast *expr_list = parse_enclosed(parse, '(',
                        parse_expr_list, ')', false);
                if (expr_list == NULL)
                    goto err;

                expr = ast_new_ast(line, CALL_EXPR, 2, expr, expr_list);
                continue;
            }
            case '.':
                parse->pos++;
                struct ast *member_ast = parse_name(parse);
                if (member_ast == NULL)
                    goto err;

                expr = ast_new_ast(line, MEMBER_EXPR, 2, expr, member_ast);
                continue;

        }
        break;
    }

    return expr;

err:
    ast_unref(expr);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xe340
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xe12d
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe32c
jmp 0xe12f
movq -0x10(%rbp), %rdi
callq 0xcb70
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xcd10
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
subl $0x28, %eax
je 0xe276
jmp 0xe155
movl -0x3c(%rbp), %eax
subl $0x2e, %eax
je 0xe2c6
jmp 0xe163
movl -0x3c(%rbp), %eax
subl $0x5b, %eax
je 0xe223
jmp 0xe171
movl -0x3c(%rbp), %eax
subl $0x5e, %eax
je 0xe1f4
jmp 0xe17b
movl -0x3c(%rbp), %eax
subl $0x11c, %eax            # imm = 0x11C
je 0xe196
jmp 0xe187
movl -0x3c(%rbp), %eax
subl $0x11d, %eax            # imm = 0x11D
je 0xe1c5
jmp 0xe30f
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x42f4, %esi           # imm = 0x42F4
movl $0x1, %edx
movb $0x0, %al
callq 0x2510
movq %rax, -0x18(%rbp)
jmp 0xe12f
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x42f3, %esi           # imm = 0x42F3
movl $0x1, %edx
movb $0x0, %al
callq 0x2510
movq %rax, -0x18(%rbp)
jmp 0xe12f
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x42f0, %esi           # imm = 0x42F0
movl $0x1, %edx
movb $0x0, %al
callq 0x2510
movq %rax, -0x18(%rbp)
jmp 0xe12f
movq -0x10(%rbp), %rdi
movl $0x5b, %esi
leaq -0x9c3(%rip), %rdx      # 0xd870
movl $0x5d, %ecx
xorl %r8d, %r8d
callq 0xd7e0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xe250
jmp 0xe31b
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %r8
movl $0x42f1, %esi           # imm = 0x42F1
movl $0x2, %edx
movb $0x0, %al
callq 0x2510
movq %rax, -0x18(%rbp)
jmp 0xe12f
movq -0x10(%rbp), %rdi
movl $0x28, %esi
leaq 0x38a(%rip), %rdx       # 0xe610
movl $0x29, %ecx
xorl %r8d, %r8d
callq 0xd7e0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xe2a0
jmp 0xe31b
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %r8
movl $0x42f2, %esi           # imm = 0x42F2
movl $0x2, %edx
movb $0x0, %al
callq 0x2510
movq %rax, -0x18(%rbp)
jmp 0xe12f
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rdi
callq 0xe660
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xe2e9
jmp 0xe31b
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %r8
movl $0x42f5, %esi           # imm = 0x42F5
movl $0x2, %edx
movb $0x0, %al
callq 0x2510
movq %rax, -0x18(%rbp)
jmp 0xe12f
jmp 0xe311
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe32c
movq -0x18(%rbp), %rdi
callq 0x27e0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)