// File: /workspace/github_c_makefile_star2_O0/naleksiev[P]fin/src/fin_ast.c
// Function: fin_ast_parse_expr_or_decl_stmt
static fin_ast_stmt_t* fin_ast_parse_expr_or_decl_stmt(fin_ctx_t* ctx, fin_lex_t* lex) {
    fin_str_t* id1 = fin_str_from_lex(ctx, fin_lex_consume_name(lex));
    fin_str_t* id2 = NULL;
    if (fin_lex_match(lex, fin_lex_type_dot))
        id2 = fin_str_from_lex(ctx, fin_lex_consume_name(lex));
    if (fin_lex_get_type(lex) == fin_lex_type_name) {
        fin_ast_type_ref_t* type = (fin_ast_type_ref_t*)ctx->alloc(NULL, sizeof(fin_ast_type_ref_t));
        type->module = id2 ? id1 : NULL;
        type->name = id2 ? id2 : id1;
        return fin_ast_parse_decl_stmt(ctx, lex, type);
    }
    fin_ast_id_expr_t* id1_expr = (fin_ast_id_expr_t*)ctx->alloc(NULL, sizeof(fin_ast_id_expr_t));
    id1_expr->base.type = fin_ast_expr_type_id;
    id1_expr->primary = NULL;
    id1_expr->name = id1;
    fin_ast_expr_t* expr = &id1_expr->base;
    if (id2) {
        fin_ast_id_expr_t* id2_expr = (fin_ast_id_expr_t*)ctx->alloc(NULL, sizeof(fin_ast_id_expr_t));
        id2_expr->base.type = fin_ast_expr_type_id;
        id2_expr->primary = expr;
        id2_expr->name = id2;
        expr = &id2_expr->base;
    }
    expr = fin_ast_parse_expr(ctx, lex, expr);
    return fin_ast_parse_expr_stmt(ctx, lex, expr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6e30
movq -0x70(%rbp), %rdi
movq %rax, -0x30(%rbp)
movl %edx, -0x28(%rbp)
movq -0x30(%rbp), %rsi
movl -0x28(%rbp), %edx
callq 0x3b30
movq %rax, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movl $0x8, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x579b
jmp 0x57c7
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6e30
movq -0x78(%rbp), %rdi
movq %rax, -0x48(%rbp)
movl %edx, -0x40(%rbp)
movq -0x48(%rbp), %rsi
movl -0x40(%rbp), %edx
callq 0x3b30
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6d10
cmpl $0x4, %eax
jne 0x5854
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edi
movl $0x10, %esi
callq *(%rax)
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x57f9
movq -0x20(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x5801
xorl %eax, %eax
movq %rax, -0x80(%rbp)
jmp 0x5801
movq -0x80(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x38(%rbp)
je 0x5820
movq -0x38(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x582b
movq -0x20(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x50(%rbp), %rdx
callq 0x5a50
movq %rax, -0x8(%rbp)
jmp 0x58ff
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edi
movl $0x18, %esi
callq *(%rax)
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl $0x0, (%rax)
movq -0x58(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x58d5
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edi
movl $0x18, %esi
callq *(%rax)
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl $0x0, (%rax)
movq -0x60(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq -0x68(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x3e60
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x60(%rbp), %rdx
callq 0x5910
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax)