// File: /workspace/github_c_makefile_star2_O1/Ihsoh[P]ilang/compiler/frontend/semantics.c
// Function: expr_unary_postfix
static void _expr_unary_postfix(
	ParserContext *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);

	uint32_t node_type = node->type;

	switch (node_type) {
		case FE_NODE_EXPR_INC_RIGHT:
		case FE_NODE_EXPR_DEC_RIGHT: {
			assert(node->nchilds == 1);

			ParserASTNode *node_oprd = node->childs[0];
			_expr_member_arridx_fncall(ctx, node_oprd);

			if (!_expr_is_lvalue(ctx, node_oprd)) {
				switch (node_type) {
					case FE_NODE_EXPR_INC_RIGHT: {
						_SYNERR_NODE(ctx, node, "unary operator postfix '++' need number left value operand.");
						break;
					}
					case FE_NODE_EXPR_DEC_RIGHT: {
						_SYNERR_NODE(ctx, node, "unary operator postfix '--' need number left value operand.");
						break;
					}
					default: {
						assert(0);
					}
				}
			}

			if (!_is_number_type_node(ctx, node_oprd)) {
				switch (node_type) {
					case FE_NODE_EXPR_INC_RIGHT: {
						_SYNERR_NODE(ctx, node, "unary operator postfix '++' need number left value operand.");
						break;
					}
					case FE_NODE_EXPR_DEC_RIGHT: {
						_SYNERR_NODE(ctx, node, "unary operator postfix '--' need number left value operand.");
						break;
					}
					default: {
						assert(0);
					}
				}
			}

			FE_EXPR_AST_NODE_COPY(node, node_oprd);

			FE_EXPR_AST_NODE_SET_CONSTANT(node, false);
			break;
		}
		default: {
			_expr_member_arridx_fncall(ctx, node);
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
testq %rsi, %rsi
je 0x310f4
movq %rsi, %rbx
movq %rdi, %r14
movl (%rsi), %r12d
leal -0xecb(%r12), %eax
cmpl $0x1, %eax
ja 0x30fd6
cmpl $0x1, 0x44(%rbx)
jne 0x31113
movq 0x48(%rbx), %rax
movq (%rax), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x321ca
movq %r15, %rdi
callq 0x2cf63
testl %eax, %eax
jne 0x3102c
cmpl $0xecc, %r12d           # imm = 0xECC
je 0x30ff0
cmpl $0xecb, %r12d           # imm = 0xECB
jne 0x31151
movups 0x1b63e(%rip), %xmm0    # 0x4c5ea
leaq -0x420(%rbp), %rdx
movups %xmm0, 0x2c(%rdx)
movups 0x1b620(%rip), %xmm0    # 0x4c5de
movaps %xmm0, 0x20(%rdx)
movups 0x1b605(%rip), %xmm0    # 0x4c5ce
movaps %xmm0, 0x10(%rdx)
movups 0x1b5ea(%rip), %xmm0    # 0x4c5be
jmp 0x3101f
movq %r14, %rdi
movq %rbx, %rsi
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x321ca
movups 0x1b62f(%rip), %xmm0    # 0x4c626
leaq -0x420(%rbp), %rdx
movups %xmm0, 0x2c(%rdx)
movups 0x1b611(%rip), %xmm0    # 0x4c61a
movaps %xmm0, 0x20(%rdx)
movups 0x1b5f6(%rip), %xmm0    # 0x4c60a
movaps %xmm0, 0x10(%rdx)
movups 0x1b5db(%rip), %xmm0    # 0x4c5fa
movaps %xmm0, (%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq *0x58(%r14)
movq %r15, %rdi
callq 0x31509
testb %al, %al
jne 0x310bf
cmpl $0xecc, %r12d           # imm = 0xECC
je 0x31083
cmpl $0xecb, %r12d           # imm = 0xECB
jne 0x31132
movups 0x1b591(%rip), %xmm0    # 0x4c5ea
leaq -0x420(%rbp), %rdx
movups %xmm0, 0x2c(%rdx)
movups 0x1b573(%rip), %xmm0    # 0x4c5de
movaps %xmm0, 0x20(%rdx)
movups 0x1b558(%rip), %xmm0    # 0x4c5ce
movaps %xmm0, 0x10(%rdx)
movups 0x1b53d(%rip), %xmm0    # 0x4c5be
jmp 0x310b2
movups 0x1b59c(%rip), %xmm0    # 0x4c626
leaq -0x420(%rbp), %rdx
movups %xmm0, 0x2c(%rdx)
movups 0x1b57e(%rip), %xmm0    # 0x4c61a
movaps %xmm0, 0x20(%rdx)
movups 0x1b563(%rip), %xmm0    # 0x4c60a
movaps %xmm0, 0x10(%rdx)
movups 0x1b548(%rip), %xmm0    # 0x4c5fa
movaps %xmm0, (%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq *0x58(%r14)
movups 0x60(%r15), %xmm0
movups 0x70(%r15), %xmm1
movups 0x80(%r15), %xmm2
movups %xmm1, 0x70(%rbx)
movups %xmm2, 0x80(%rbx)
movups %xmm0, 0x60(%rbx)
movb $0x0, 0x70(%rbx)
addq $0x400, %rsp            # imm = 0x400
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12c9b(%rip), %rdi     # 0x43d96
leaq 0x1a758(%rip), %rsi     # 0x4b85a
leaq 0x1b47a(%rip), %rcx     # 0x4c583
movl $0xdaf, %edx            # imm = 0xDAF
callq 0x30a0
leaq 0x1b5d6(%rip), %rdi     # 0x4c6f0
leaq 0x1a739(%rip), %rsi     # 0x4b85a
leaq 0x1b45b(%rip), %rcx     # 0x4c583
movl $0xdb6, %edx            # imm = 0xDB6
callq 0x30a0
leaq 0xf24b(%rip), %rdi      # 0x40384
leaq 0x1a71a(%rip), %rsi     # 0x4b85a
leaq 0x1b43c(%rip), %rcx     # 0x4c583
movl $0xdd6, %edx            # imm = 0xDD6
callq 0x30a0
leaq 0xf22c(%rip), %rdi      # 0x40384
leaq 0x1a6fb(%rip), %rsi     # 0x4b85a
leaq 0x1b41d(%rip), %rcx     # 0x4c583
movl $0xdc6, %edx            # imm = 0xDC6
callq 0x30a0