// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x4225
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x423a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x4080
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movl $0x10, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x4256
jmp 0x4262
movl $0x0, -0x24(%rbp)
jmp 0x43b4
movq -0x18(%rbp), %rdi
movl $0x1e, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x4276
jmp 0x4282
movl $0x1, -0x24(%rbp)
jmp 0x43b2
movq -0x18(%rbp), %rdi
movl $0x1f, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x4296
jmp 0x42a2
movl $0x2, -0x24(%rbp)
jmp 0x43b0
movq -0x18(%rbp), %rdi
movl $0x20, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x42b6
jmp 0x42c2
movl $0x3, -0x24(%rbp)
jmp 0x43ae
movq -0x18(%rbp), %rdi
movl $0x21, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x42d6
jmp 0x42e2
movl $0x4, -0x24(%rbp)
jmp 0x43ac
movq -0x18(%rbp), %rdi
movl $0x22, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x42f6
jmp 0x4302
movl $0x5, -0x24(%rbp)
jmp 0x43aa
movq -0x18(%rbp), %rdi
movl $0x23, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x4316
jmp 0x4322
movl $0x6, -0x24(%rbp)
jmp 0x43a8
movq -0x18(%rbp), %rdi
movl $0x24, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x4336
jmp 0x433f
movl $0x7, -0x24(%rbp)
jmp 0x43a6
movq -0x18(%rbp), %rdi
movl $0x25, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x4353
jmp 0x435c
movl $0x8, -0x24(%rbp)
jmp 0x43a4
movq -0x18(%rbp), %rdi
movl $0x29, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x4370
jmp 0x4379
movl $0x9, -0x24(%rbp)
jmp 0x43a2
movq -0x18(%rbp), %rdi
movl $0x2d, %esi
callq 0x6cd0
testb $0x1, %al
jne 0x438d
jmp 0x4396
movl $0xa, -0x24(%rbp)
jmp 0x43a0
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x440b
jmp 0x43a2
jmp 0x43a4
jmp 0x43a6
jmp 0x43a8
jmp 0x43aa
jmp 0x43ac
jmp 0x43ae
jmp 0x43b0
jmp 0x43b2
jmp 0x43b4
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edi
movl $0x20, %esi
callq *(%rax)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl $0xc, (%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3e60
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)