// File: /workspace/github_c_makefile_star2_O2/Ihsoh[P]ilang/compiler/frontend/semantics.c
// Function: process_struct_member
static void _process_struct_member(
	ParserContext *ctx,
	ParserASTNode *node,
	ParserASTNode *node_struct_body,
	ParserSymbol *symbol_struct
) {
	assert(ctx);
	assert(node);
	assert(node->type == FE_NODE_STRUCT);
	assert(node->nchilds == 2);
	assert(node_struct_body);
	assert(node_struct_body->type == FE_NODE_STRUCT_BODY);
	assert(symbol_struct);

	for (int i = 0; i < node_struct_body->nchilds; i++) {
		ParserASTNode *child = node_struct_body->childs[i];
		assert(child);
		if (child->type == FE_NODE_VAR) {
			FE_VAR_AST_NODE_SET_TYPE(child, FE_VAR_TYPE_STRUCT_MEMBER);
			for (int j = 0; j < child->nchilds; j++) {
				ParserASTNode *node_var_item = child->childs[j];
				assert(node_var_item->type == FE_NODE_VAR_ITEM);
				
				if (node_var_item->nchilds == 2) {
					ParserASTNode *node_var_id = node_var_item->childs[0];
					assert(node_var_id->type == FE_NODE_IDENTIFIER);

					ParserASTNode *node_var_type = node_var_item->childs[1];
					uint8_t var_type = 0;
					_type(ctx, node_var_type, &var_type);

					fe_parser_add_struct_member_var_symbol_to_symbol(
						ctx,
						symbol_struct,
						node_var_id->token,
						var_type,
						node_var_type
					);
				} else if (node_var_item->nchilds == 3) {
					_SYNERR_NODE(
						ctx,
						node,
						"struct variable cannot contain initial expression."
					);
				} else {
					assert(0);
				}
			}
		} else {
			assert(0);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rcx, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
cmpl $0xd00, (%rsi)          # imm = 0xD00
jne 0x308ff
movq %rsi, %r14
cmpl $0x2, 0x44(%rsi)
jne 0x3091e
testq %rdx, %rdx
je 0x3093d
cmpl $0xd01, (%rdx)          # imm = 0xD01
jne 0x3095c
cmpq $0x0, -0x30(%rbp)
je 0x3097b
xorl %ecx, %ecx
movq %rdx, -0x40(%rbp)
movq %r14, -0x50(%rbp)
movq -0x38(%rbp), %rbx
movslq 0x44(%rdx), %rax
cmpq %rax, %rcx
jge 0x30852
movq 0x48(%rdx), %rax
movq (%rax,%rcx,8), %r12
testq %r12, %r12
je 0x308c1
movq %rcx, -0x48(%rbp)
cmpl $0xc00, (%r12)          # imm = 0xC00
jne 0x308e0
movb $0x3, 0x60(%r12)
xorl %r15d, %r15d
movslq 0x44(%r12), %rax
cmpq %rax, %r15
jge 0x30842
movq 0x48(%r12), %rax
movq (%rax,%r15,8), %rax
cmpl $0xc01, (%rax)          # imm = 0xC01
jne 0x30864
movl 0x44(%rax), %ecx
cmpl $0x3, %ecx
je 0x307f5
cmpl $0x2, %ecx
jne 0x30883
movq 0x48(%rax), %rax
movq (%rax), %r13
cmpl $0x200, (%r13)          # imm = 0x200
jne 0x308a2
movq 0x8(%rax), %r14
movb $0x0, -0x450(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
leaq -0x450(%rbp), %rdx
callq 0x290cb
movq 0x10(%r13), %rdx
movzbl -0x450(%rbp), %ecx
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movq %r14, %r8
movq -0x50(%rbp), %r14
callq 0x237f8
jmp 0x3083a
movups 0x1919c(%rip), %xmm0    # 0x49998
movaps %xmm0, -0x430(%rbp)
movups 0x1917e(%rip), %xmm0    # 0x49988
movaps %xmm0, -0x440(%rbp)
movups 0x19160(%rip), %xmm0    # 0x49978
movaps %xmm0, -0x450(%rbp)
movl $0x2e6e6f, -0x421(%rbp) # imm = 0x2E6E6F
movq -0x38(%rbp), %rdi
movq %r14, %rsi
leaq -0x450(%rbp), %rdx
callq *0x58(%rdi)
incq %r15
jmp 0x3076f
movq -0x48(%rbp), %rcx
incq %rcx
movq -0x40(%rbp), %rdx
jmp 0x30736
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdd3c(%rip), %rdi      # 0x3e5a7
leaq 0x170c8(%rip), %rsi     # 0x4793a
leaq 0x19059(%rip), %rcx     # 0x498d2
movl $0x145e, %edx           # imm = 0x145E
callq 0x30a0
leaq 0xbad6(%rip), %rdi      # 0x3c360
leaq 0x170a9(%rip), %rsi     # 0x4793a
leaq 0x1903a(%rip), %rcx     # 0x498d2
movl $0x1476, %edx           # imm = 0x1476
callq 0x30a0
leaq 0x190a7(%rip), %rdi     # 0x49950
leaq 0x1708a(%rip), %rsi     # 0x4793a
leaq 0x1901b(%rip), %rcx     # 0x498d2
movl $0x1462, %edx           # imm = 0x1462
callq 0x30a0
leaq 0xba36(%rip), %rdi      # 0x3c2fe
leaq 0x1706b(%rip), %rsi     # 0x4793a
leaq 0x18ffc(%rip), %rcx     # 0x498d2
movl $0x1459, %edx           # imm = 0x1459
callq 0x30a0
leaq 0xba79(%rip), %rdi      # 0x3c360
leaq 0x1704c(%rip), %rsi     # 0x4793a
leaq 0x18fdd(%rip), %rcx     # 0x498d2
movl $0x147a, %edx           # imm = 0x147A
callq 0x30a0
leaq 0x1750a(%rip), %rdi     # 0x47e10
leaq 0x1702d(%rip), %rsi     # 0x4793a
leaq 0x18fbe(%rip), %rcx     # 0x498d2
movl $0x1451, %edx           # imm = 0x1451
callq 0x30a0
leaq 0x17410(%rip), %rdi     # 0x47d35
leaq 0x1700e(%rip), %rsi     # 0x4793a
leaq 0x18f9f(%rip), %rcx     # 0x498d2
movl $0x1452, %edx           # imm = 0x1452
callq 0x30a0
leaq 0x18fed(%rip), %rdi     # 0x49931
leaq 0x16fef(%rip), %rsi     # 0x4793a
leaq 0x18f80(%rip), %rcx     # 0x498d2
movl $0x1453, %edx           # imm = 0x1453
callq 0x30a0
leaq 0x12859(%rip), %rdi     # 0x431bc
leaq 0x16fd0(%rip), %rsi     # 0x4793a
leaq 0x18f61(%rip), %rcx     # 0x498d2
movl $0x1454, %edx           # imm = 0x1454
callq 0x30a0
leaq 0x18fc0(%rip), %rdi     # 0x49942
leaq 0x16fb1(%rip), %rsi     # 0x4793a
leaq 0x18f42(%rip), %rcx     # 0x498d2
movl $0x1455, %edx           # imm = 0x1455
callq 0x30a0