// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/frontend/semantics.c
// Function: struct
static void _struct(
	ParserContext *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);
	assert(node->type == FE_NODE_STRUCT);
	assert(node->nchilds == 2);

	ParserASTNode *node_identifier = node->childs[0];
	assert(node_identifier->type == FE_NODE_IDENTIFIER);

	ParserASTNode *node_struct_body = node->childs[1];
	assert(node_struct_body->type == FE_NODE_STRUCT_BODY
			|| node_struct_body->type == FE_NODE_DUMMY);

	ParserASTNode *node_parent = node->parent;
	assert(node_parent);

	if (node_struct_body->type == FE_NODE_DUMMY) {
		fe_parser_add_struct_symbol_to_node(
			ctx, node_parent, node_identifier->token, node_struct_body, true
		);
	} else {
		ParserSymbol *symbol = parser_get_symbol_from_node(
			ctx, node_parent, FE_SYM_STRUCT, node_identifier->token
		);

		if (symbol != NULL
				&& FE_STRUCT_SYMBOL_GET_DUMMY(symbol)) {
			_process_struct_member(ctx, node, node_struct_body, symbol);

			FE_STRUCT_SYMBOL_SET_DUMMY(symbol, false);
			FE_STRUCT_SYMBOL_SET_STRUCT_NODE(symbol, node);
			FE_STRUCT_SYMBOL_SET_BODY_NODE(symbol, node_struct_body);
		} else {
			ParserSymbol *symbol_struct = fe_parser_new_struct_symbol(
				ctx, node_identifier->token, node, node_struct_body, false
			);

			_process_struct_member(ctx, node, node_struct_body, symbol_struct);

			parser_add_symptr_to_node(ctx, node_parent, symbol_struct);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x4e1e9
jmp 0x4e208
leaq 0x2e366(%rip), %rdi     # 0x7c556
leaq 0x30053(%rip), %rsi     # 0x7e24a
movl $0x1483, %edx           # imm = 0x1483
leaq 0x320f1(%rip), %rcx     # 0x802f4
callq 0x30a0
cmpq $0x0, -0x10(%rbp)
je 0x4e211
jmp 0x4e230
leaq 0x27dbb(%rip), %rdi     # 0x75fd3
leaq 0x3002b(%rip), %rsi     # 0x7e24a
movl $0x1484, %edx           # imm = 0x1484
leaq 0x320c9(%rip), %rcx     # 0x802f4
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0xd00, (%rax)          # imm = 0xD00
jne 0x4e23e
jmp 0x4e25d
leaq 0x3050a(%rip), %rdi     # 0x7e74f
leaq 0x2fffe(%rip), %rsi     # 0x7e24a
movl $0x1485, %edx           # imm = 0x1485
leaq 0x3209c(%rip), %rcx     # 0x802f4
callq 0x30a0
movq -0x10(%rbp), %rax
cmpl $0x2, 0x44(%rax)
jne 0x4e269
jmp 0x4e288
leaq 0x30404(%rip), %rdi     # 0x7e674
leaq 0x2ffd3(%rip), %rsi     # 0x7e24a
movl $0x1486, %edx           # imm = 0x1486
leaq 0x32071(%rip), %rcx     # 0x802f4
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x200, (%rax)          # imm = 0x200
jne 0x4e2a5
jmp 0x4e2c4
leaq 0x2637e(%rip), %rdi     # 0x7462a
leaq 0x2ff97(%rip), %rsi     # 0x7e24a
movl $0x1489, %edx           # imm = 0x1489
leaq 0x32035(%rip), %rcx     # 0x802f4
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0xd01, (%rax)          # imm = 0xD01
je 0x4e2ec
movq -0x20(%rbp), %rax
cmpl $0x900, (%rax)          # imm = 0x900
jne 0x4e2ee
jmp 0x4e30d
leaq 0x3202e(%rip), %rdi     # 0x80323
leaq 0x2ff4e(%rip), %rsi     # 0x7e24a
movl $0x148d, %edx           # imm = 0x148D
leaq 0x31fec(%rip), %rcx     # 0x802f4
callq 0x30a0
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4e322
jmp 0x4e341
leaq 0x3006e(%rip), %rdi     # 0x7e397
leaq 0x2ff1a(%rip), %rsi     # 0x7e24a
movl $0x1490, %edx           # imm = 0x1490
leaq 0x31fb8(%rip), %rcx     # 0x802f4
callq 0x30a0
movq -0x20(%rbp), %rax
cmpl $0x900, (%rax)          # imm = 0x900
jne 0x4e371
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x20(%rbp), %rcx
movl $0x1, %r8d
callq 0x430a0
jmp 0x4e41f
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movl $0x2, %edx
callq 0x82f0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x4e3d7
movq -0x30(%rbp), %rax
testb $0x1, 0x40(%rax)
je 0x4e3d7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0x5cfe0
movq -0x30(%rbp), %rax
movb $0x0, 0x40(%rax)
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x38(%rax)
jmp 0x4e41d
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %rcx
xorl %r8d, %r8d
callq 0x42fc0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0x5cfe0
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x8200
jmp 0x4e41f
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)