// File: /workspace/github_c_makefile_star2_O0/ryvnf[P]czc/parse.c
// Function: parse_primary_expr
static struct ast *parse_primary_expr(struct parse *parse)
{
    struct loc *line = get_linenr(parse);
    switch (peek_tok(parse)->type) {
        case IDENT_TOK: {
            char *ident = get_tok(parse)->val.u.s;

            struct ast *name = ast_new_s(line, NAME, ident);

            int pos = parse->pos;
            struct ast *type = parse_type(parse);
            if (type == NULL) {
                ast_unref(type);
                parse->pos = pos;
                return name;
            }

            return ast_new_ast(line, DECL, 2, name, type);
        }
        case NULL_TOK: {
            return ast_new_i(line, NULL_CONST, get_tok(parse)->val.u.i);
        }
        case TRUE_TOK: {
            return ast_new_i(line, TRUE_CONST, get_tok(parse)->val.u.i);
        }
        case FALSE_TOK: {
            return ast_new_i(line, FALSE_CONST, get_tok(parse)->val.u.i);
        }
        case NUM_TOK: {
            return ast_new_i(line, INT_CONST, get_tok(parse)->val.u.i);
        }
        case FLOAT_NUM_TOK: {
            return ast_new_f(line, FLOAT_CONST, get_tok(parse)->val.u.f);
        }
        case STR_TOK: {
            yylval_type *tok = &get_tok(parse)->val;
            return ast_new_chars(line, STR_LIT, tok->u.chars.s, tok->u.chars.n);
        }
        case '(': {
            return parse_enclosed(parse, '(', parse_expr, ')', false);
        }
        case '{': {
            struct ast *ast = parse_enclosed(parse, '{', parse_expr_list, '}', false);
            if (ast == NULL)
                return NULL;

            ast->tag = INIT_EXPR;
            return ast;
        }
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0xcb70
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0xcd10
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
subl $0x28, %eax
je 0xe58c
jmp 0xe375
movl -0x4c(%rbp), %eax
subl $0x7b, %eax
je 0xe5af
jmp 0xe383
movl -0x4c(%rbp), %eax
subl $0x11e, %eax            # imm = 0x11E
je 0xe557
jmp 0xe393
movl -0x4c(%rbp), %eax
subl $0x11f, %eax            # imm = 0x11F
je 0xe4fe
jmp 0xe3a3
movl -0x4c(%rbp), %eax
subl $0x120, %eax            # imm = 0x120
je 0xe3f2
jmp 0xe3af
movl -0x4c(%rbp), %eax
subl $0x124, %eax            # imm = 0x124
je 0xe47d
jmp 0xe3bf
movl -0x4c(%rbp), %eax
subl $0x125, %eax            # imm = 0x125
je 0xe4a6
jmp 0xe3cf
movl -0x4c(%rbp), %eax
subl $0x126, %eax            # imm = 0x126
je 0xe4d2
jmp 0xe3df
movl -0x4c(%rbp), %eax
subl $0x129, %eax            # imm = 0x129
je 0xe52a
jmp 0xe5f5
movq -0x10(%rbp), %rdi
callq 0xd480
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x1000, %esi           # imm = 0x1000
callq 0x23a0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd4b0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0xe457
movq -0x38(%rbp), %rdi
callq 0x27e0
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe5fd
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %r8
movl $0x4000, %esi           # imm = 0x4000
movl $0x2, %edx
movb $0x0, %al
callq 0x2510
movq %rax, -0x8(%rbp)
jmp 0xe5fd
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd480
movq -0x58(%rbp), %rdi
movq 0x10(%rax), %rdx
xorl %esi, %esi
callq 0x2470
movq %rax, -0x8(%rbp)
jmp 0xe5fd
movq -0x18(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd480
movq -0x60(%rbp), %rdi
movq 0x10(%rax), %rdx
movl $0x2, %esi
callq 0x2470
movq %rax, -0x8(%rbp)
jmp 0xe5fd
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd480
movq -0x68(%rbp), %rdi
movq 0x10(%rax), %rdx
movl $0x1, %esi
callq 0x2470
movq %rax, -0x8(%rbp)
jmp 0xe5fd
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd480
movq -0x70(%rbp), %rdi
movq 0x10(%rax), %rdx
movl $0x2000, %esi           # imm = 0x2000
callq 0x2470
movq %rax, -0x8(%rbp)
jmp 0xe5fd
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd480
movq -0x78(%rbp), %rdi
movsd 0x10(%rax), %xmm0
movl $0x3000, %esi           # imm = 0x3000
callq 0x24c0
movq %rax, -0x8(%rbp)
jmp 0xe5fd
movq -0x10(%rbp), %rdi
callq 0xd480
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rcx
movl $0x5000, %esi           # imm = 0x5000
callq 0x2400
movq %rax, -0x8(%rbp)
jmp 0xe5fd
movq -0x10(%rbp), %rdi
movl $0x28, %esi
leaq -0xd2c(%rip), %rdx      # 0xd870
movl $0x29, %ecx
xorl %r8d, %r8d
callq 0xd7e0
movq %rax, -0x8(%rbp)
jmp 0xe5fd
movq -0x10(%rbp), %rdi
movl $0x7b, %esi
leaq 0x51(%rip), %rdx        # 0xe610
movl $0x7d, %ecx
xorl %r8d, %r8d
callq 0xd7e0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0xe5e1
movq $0x0, -0x8(%rbp)
jmp 0xe5fd
movq -0x48(%rbp), %rax
movl $0x42f6, (%rax)         # imm = 0x42F6
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xe5fd
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)