// File: /workspace/github_c_makefile_star2_O2/naleksiev[P]fin/src/fin_ast.c
// Function: fin_ast_parse_assign_expr
static fin_ast_expr_t* fin_ast_parse_assign_expr(fin_ctx_t* ctx, fin_lex_t* lex, fin_ast_expr_t* lhs) {
    lhs = lhs ? lhs : fin_ast_parse_id_expr(ctx, lex, NULL);
    fin_ast_assign_type_t op;
    if (fin_lex_match(lex, fin_lex_type_eq))
        op = fin_ast_assign_type_assign;
    else if (fin_lex_match(lex, fin_lex_type_plus_eq))
        op = fin_ast_assign_type_add;
    else if (fin_lex_match(lex, fin_lex_type_minus_eq))
        op = fin_ast_assign_type_sub;
    else if (fin_lex_match(lex, fin_lex_type_star_eq))
        op = fin_ast_assign_type_mul;
    else if (fin_lex_match(lex, fin_lex_type_slash_eq))
        op = fin_ast_assign_type_div;
    else if (fin_lex_match(lex, fin_lex_type_percent_eq))
        op = fin_ast_assign_type_mod;
    else if (fin_lex_match(lex, fin_lex_type_amp_eq))
        op = fin_ast_assign_type_and;
    else if (fin_lex_match(lex, fin_lex_type_pipe_eq))
        op = fin_ast_assign_type_or;
    else if (fin_lex_match(lex, fin_lex_type_caret_eq))
        op = fin_ast_assign_type_xor;
    else if (fin_lex_match(lex, fin_lex_type_lt_lt_eq))
        op = fin_ast_assign_type_shl;
    else if (fin_lex_match(lex, fin_lex_type_gt_gt_eq))
        op = fin_ast_assign_type_shr;
    else
        return lhs;

    fin_ast_assign_expr_t* assign_expr = (fin_ast_assign_expr_t*)ctx->alloc(NULL, sizeof(fin_ast_assign_expr_t));
    assign_expr->base.type = fin_ast_expr_type_assign;
    assign_expr->lhs = lhs;
    assign_expr->rhs = fin_ast_parse_expr(ctx, lex, NULL);
    assign_expr->op = op;
    return &assign_expr->base;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
jne 0x3c9f
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3b75
movq %rax, %r15
pushq $0x10
popq %rsi
movq %rbx, %rdi
callq 0x5537
xorl %r13d, %r13d
testb %al, %al
jne 0x3d7c
pushq $0x1e
popq %rsi
movq %rbx, %rdi
callq 0x5537
testb %al, %al
je 0x3ccb
pushq $0x1
jmp 0x3d7a
pushq $0x1f
popq %rsi
movq %rbx, %rdi
callq 0x5537
testb %al, %al
je 0x3ce1
pushq $0x2
jmp 0x3d7a
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x5537
testb %al, %al
je 0x3cf7
pushq $0x3
jmp 0x3d7a
pushq $0x21
popq %rsi
movq %rbx, %rdi
callq 0x5537
testb %al, %al
je 0x3d0a
pushq $0x4
jmp 0x3d7a
pushq $0x22
popq %rsi
movq %rbx, %rdi
callq 0x5537
testb %al, %al
je 0x3d1d
pushq $0x5
jmp 0x3d7a
pushq $0x23
popq %rsi
movq %rbx, %rdi
callq 0x5537
testb %al, %al
je 0x3d30
pushq $0x6
jmp 0x3d7a
pushq $0x24
popq %rsi
movq %rbx, %rdi
callq 0x5537
testb %al, %al
je 0x3d43
pushq $0x7
jmp 0x3d7a
pushq $0x25
popq %rsi
movq %rbx, %rdi
callq 0x5537
testb %al, %al
je 0x3d56
pushq $0x8
jmp 0x3d7a
pushq $0x29
popq %rsi
movq %rbx, %rdi
callq 0x5537
testb %al, %al
je 0x3d69
pushq $0x9
jmp 0x3d7a
pushq $0x2d
popq %rsi
movq %rbx, %rdi
callq 0x5537
testb %al, %al
je 0x3dab
pushq $0xa
popq %r13
pushq $0x20
popq %rsi
xorl %edi, %edi
callq *(%r14)
movq %rax, %r12
movl $0xc, (%rax)
movq %r15, 0x8(%rax)
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x3a1d
movq %rax, 0x10(%r12)
movl %r13d, 0x18(%r12)
movq %r12, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq