// File: /workspace/github_c_makefile_star2_O0/chgzm[P]minic/parser.c
// Function: create_assign_expr_node
static AssignExprNode* create_assign_expr_node(const Vector* vec, int* index) {
    AssignExprNode* assign_expr_node = calloc(1, sizeof(AssignExprNode));

    assign_expr_node->assign_operator = OP_NONE;

    const int buf = *index;
    assign_expr_node->unary_expr_node = create_unary_expr_node(vec, index);
    if (assign_expr_node->unary_expr_node == NULL) {
        error("Failed to create unary-expression node.\n");
        return NULL;
    }

    const Token* token = vec->elements[*index];
    if (token->type == TK_ASSIGN || token->type == TK_MUL_EQ || token->type == TK_DIV_EQ
     || token->type == TK_MOD_EQ || token->type == TK_ADD_EQ || token->type == TK_SUB_EQ
     || token->type == TK_AND_EQ || token->type == TK_XOR_EQ || token->type == TK_OR_EQ) {
        if      (token->type == TK_ASSIGN) { assign_expr_node->assign_operator = OP_ASSIGN; }
        else if (token->type == TK_MUL_EQ) { assign_expr_node->assign_operator = OP_MUL_EQ; }
        else if (token->type == TK_DIV_EQ) { assign_expr_node->assign_operator = OP_DIV_EQ; }
        else if (token->type == TK_MOD_EQ) { assign_expr_node->assign_operator = OP_MOD_EQ; }
        else if (token->type == TK_ADD_EQ) { assign_expr_node->assign_operator = OP_ADD_EQ; }
        else if (token->type == TK_SUB_EQ) { assign_expr_node->assign_operator = OP_SUB_EQ; }
        else if (token->type == TK_AND_EQ) { assign_expr_node->assign_operator = OP_AND_EQ; }
        else if (token->type == TK_XOR_EQ) { assign_expr_node->assign_operator = OP_XOR_EQ; }
        else if (token->type == TK_OR_EQ)  { assign_expr_node->assign_operator = OP_OR_EQ;  }

        ++(*index);
        assign_expr_node->assign_expr_node = create_assign_expr_node(vec, index);
        if (assign_expr_node->assign_expr_node == NULL) {
            error("Failed to create assign-expression node.\n");
            return NULL;
        }
    } else {
        assign_expr_node->unary_expr_node = NULL;
        *index = buf; // restore index

        assign_expr_node->conditional_expr_node = create_conditional_expr_node(vec, index);
        if (assign_expr_node->conditional_expr_node == NULL) {
            error("Failed to create conditional-expression node.\n");
            return NULL;
        }
    }

    return assign_expr_node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x1, %edi
movl $0x20, %esi
callq 0x10b0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, 0x18(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9ca0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0xa8f5
leaq 0x5b40(%rip), %rdi      # 0x10421
movb $0x0, %al
callq 0xe4e0
movq $0x0, -0x8(%rbp)
jmp 0xaadd
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x1e, (%rax)
je 0xa960
movq -0x30(%rbp), %rax
cmpl $0x3d, (%rax)
je 0xa960
movq -0x30(%rbp), %rax
cmpl $0x3e, (%rax)
je 0xa960
movq -0x30(%rbp), %rax
cmpl $0x3f, (%rax)
je 0xa960
movq -0x30(%rbp), %rax
cmpl $0x40, (%rax)
je 0xa960
movq -0x30(%rbp), %rax
cmpl $0x41, (%rax)
je 0xa960
movq -0x30(%rbp), %rax
cmpl $0x42, (%rax)
je 0xa960
movq -0x30(%rbp), %rax
cmpl $0x43, (%rax)
je 0xa960
movq -0x30(%rbp), %rax
cmpl $0x44, (%rax)
jne 0xaa85
movq -0x30(%rbp), %rax
cmpl $0x1e, (%rax)
jne 0xa979
movq -0x20(%rbp), %rax
movl $0x1, 0x18(%rax)
jmp 0xaa3d
movq -0x30(%rbp), %rax
cmpl $0x3d, (%rax)
jne 0xa992
movq -0x20(%rbp), %rax
movl $0x2, 0x18(%rax)
jmp 0xaa3b
movq -0x30(%rbp), %rax
cmpl $0x3e, (%rax)
jne 0xa9ab
movq -0x20(%rbp), %rax
movl $0x3, 0x18(%rax)
jmp 0xaa39
movq -0x30(%rbp), %rax
cmpl $0x3f, (%rax)
jne 0xa9c1
movq -0x20(%rbp), %rax
movl $0x4, 0x18(%rax)
jmp 0xaa37
movq -0x30(%rbp), %rax
cmpl $0x40, (%rax)
jne 0xa9d7
movq -0x20(%rbp), %rax
movl $0x5, 0x18(%rax)
jmp 0xaa35
movq -0x30(%rbp), %rax
cmpl $0x41, (%rax)
jne 0xa9ed
movq -0x20(%rbp), %rax
movl $0x6, 0x18(%rax)
jmp 0xaa33
movq -0x30(%rbp), %rax
cmpl $0x42, (%rax)
jne 0xaa03
movq -0x20(%rbp), %rax
movl $0x7, 0x18(%rax)
jmp 0xaa31
movq -0x30(%rbp), %rax
cmpl $0x43, (%rax)
jne 0xaa19
movq -0x20(%rbp), %rax
movl $0x8, 0x18(%rax)
jmp 0xaa2f
movq -0x30(%rbp), %rax
cmpl $0x44, (%rax)
jne 0xaa2d
movq -0x20(%rbp), %rax
movl $0x9, 0x18(%rax)
jmp 0xaa2f
jmp 0xaa31
jmp 0xaa33
jmp 0xaa35
jmp 0xaa37
jmp 0xaa39
jmp 0xaa3b
jmp 0xaa3d
movq -0x18(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xa880
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xaa83
leaq 0x5aee(%rip), %rdi      # 0x10560
movb $0x0, %al
callq 0xe4e0
movq $0x0, -0x8(%rbp)
jmp 0xaadd
jmp 0xaad5
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x8df0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0xaad3
leaq 0x574f(%rip), %rdi      # 0x10211
movb $0x0, %al
callq 0xe4e0
movq $0x0, -0x8(%rbp)
jmp 0xaadd
jmp 0xaad5
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)