// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/frontend/parser.c
// Function: new_node
static ParserASTNode * _new_node(
	ParserContext *ctx,
	int32_t type,
	char *type_name,
	LexerToken *token
) {
	assert(ctx);
	assert(type_name);

	if (FE_IS_EXPR_NODE(type)) {
		FeParserExprASTNodeData data;
		data.type = FE_TYPE_UNKNOWN;
		data.type_node = NULL;

		data.constant = false;
		data.constant_type = FE_TYPE_UNKNOWN;

		data.has_conststr = false;
		data.conststr.str = NULL;
		data.conststr.len = 0;

		return parser_new_node(
			ctx, type, type_name, token, sizeof(FeParserExprASTNodeData), &data
		);
	} else if (type == FE_NODE_VAR) {
		FeParserVarASTNodeData data;
		data.type = FE_VAR_TYPE_UNKNOWN;
		data.align_node = NULL;
		data.align = 0;
		return parser_new_node(
			ctx, type, type_name, token, sizeof(FeParserVarASTNodeData), &data
		);
	} else if (type == FE_NODE_VAR_ITEM) {
		FeParserVarItemASTNodeData data;
		data.symbol = NULL;
		return parser_new_node(
			ctx, type, type_name, token, sizeof(FeParserVarItemASTNodeData), &data
		);
	} else if (type == FE_NODE_FUNC) {
		FeParserFuncASTNodeData data;
		data.symbol = NULL;
		return parser_new_node(
			ctx, type, type_name, token, sizeof(FeParserFuncASTNodeData), &data
		);
	} else if (type == FE_NODE_FUNC_PARAMS_ITEM) {
		FeParserFuncParamASTNodeData data;
		data.symbol = NULL;
		return parser_new_node(
			ctx, type, type_name, token, sizeof(FeParserFuncParamASTNodeData), &data
		);
	} else if (type == FE_NODE_STAT_WHILE
			|| type == FE_NODE_STAT_DO
			|| type == FE_NODE_STAT_FOR) {
		FeParserLoopASTNodeData data;
		rstr_init(&(data.label_repeat));
		rstr_init(&(data.label_end));

		ParserASTNode *node = parser_new_node(
			ctx, type, type_name, token, sizeof(FeParserLoopASTNodeData), &data
		);
		node->releaser = _loop_ast_node_releaser;

		return node;
	} else if (type == FE_NODE_STRUCT) {
		FeParserStructASTNodeData data;

		data.packed_node = NULL;
		data.packed = false;

		return parser_new_node(
			ctx, type, type_name, token, sizeof(FeParserStructASTNodeData), &data
		);
	} else {
		return parser_new_node(
			ctx, type, type_name, token, 0, NULL
		);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x42083
jmp 0x420a2
leaq 0x3a4cc(%rip), %rdi     # 0x7c556
leaq 0x39d9b(%rip), %rsi     # 0x7be2c
movl $0x25, %edx
leaq 0x3a464(%rip), %rcx     # 0x7c501
callq 0x30a0
cmpq $0x0, -0x20(%rbp)
je 0x420ab
jmp 0x420ca
leaq 0x3a498(%rip), %rdi     # 0x7c54a
leaq 0x39d73(%rip), %rsi     # 0x7be2c
movl $0x26, %edx
leaq 0x3a43c(%rip), %rcx     # 0x7c501
callq 0x30a0
movl -0x14(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x42128
movb $0x0, -0x58(%rbp)
movq $0x0, -0x50(%rbp)
movb $0x0, -0x48(%rbp)
movb $0x0, -0x47(%rbp)
movb $0x0, -0x46(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x30, %r8d
leaq -0x58(%rbp), %r9
callq 0x79f0
movq %rax, -0x8(%rbp)
jmp 0x422f9
cmpl $0xc00, -0x14(%rbp)     # imm = 0xC00
jne 0x4216b
movb $0x0, -0x70(%rbp)
movq $0x0, -0x68(%rbp)
movl $0x0, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x18, %r8d
leaq -0x70(%rbp), %r9
callq 0x79f0
movq %rax, -0x8(%rbp)
jmp 0x422f9
cmpl $0xc01, -0x14(%rbp)     # imm = 0xC01
jne 0x421a3
movq $0x0, -0x78(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x8, %r8d
leaq -0x78(%rbp), %r9
callq 0x79f0
movq %rax, -0x8(%rbp)
jmp 0x422f9
cmpl $0xa00, -0x14(%rbp)     # imm = 0xA00
jne 0x421db
movq $0x0, -0x80(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x8, %r8d
leaq -0x80(%rbp), %r9
callq 0x79f0
movq %rax, -0x8(%rbp)
jmp 0x422f9
cmpl $0xa02, -0x14(%rbp)     # imm = 0xA02
jne 0x42219
movq $0x0, -0x88(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x8, %r8d
leaq -0x88(%rbp), %r9
callq 0x79f0
movq %rax, -0x8(%rbp)
jmp 0x422f9
cmpl $0xb20, -0x14(%rbp)     # imm = 0xB20
je 0x42234
cmpl $0xb30, -0x14(%rbp)     # imm = 0xB30
je 0x42234
cmpl $0xb40, -0x14(%rbp)     # imm = 0xB40
jne 0x42297
leaq -0xa8(%rbp), %rdi
callq 0x8c90
leaq -0xa8(%rbp), %rdi
addq $0x10, %rdi
callq 0x8c90
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x20, %r8d
leaq -0xa8(%rbp), %r9
callq 0x79f0
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
leaq -0x306(%rip), %rcx      # 0x41f80
movq %rcx, 0x50(%rax)
movq -0xb0(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x422f9
cmpl $0xd00, -0x14(%rbp)     # imm = 0xD00
jne 0x422d9
movq $0x0, -0xc0(%rbp)
movb $0x0, -0xb8(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x10, %r8d
leaq -0xc0(%rbp), %r9
callq 0x79f0
movq %rax, -0x8(%rbp)
jmp 0x422f9
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
xorl %eax, %eax
movl %eax, %r9d
movq %r9, %r8
callq 0x79f0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)