// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/backend/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 (BE_IS_EXPR_NODE(type)) {
		BeParserExprASTNodeData data;
		data.type = BE_TYPE_UNKNOWN;
		data.type_node = NULL;

		data.constant = false;
		data.constant_type = BE_TYPE_UNKNOWN;

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

		return parser_new_node(
			ctx, type, type_name, token, sizeof(BeParserExprASTNodeData), &data
		);
	} else if (type == BE_NODE_VAR) {
		BeParserVarASTNodeData data;
		data.type = BE_VAR_TYPE_UNKNOWN;
		data.align_node = NULL;
		data.align = 0;
		return parser_new_node(
			ctx, type, type_name, token, sizeof(BeParserVarASTNodeData), &data
		);
	} else if (type == BE_NODE_VAR_ITEM) {
		BeParserVarItemASTNodeData data;
		data.symbol = NULL;
		return parser_new_node(
			ctx, type, type_name, token, sizeof(BeParserVarItemASTNodeData), &data
		);
	} else if (type == BE_NODE_FUNC) {
		BeParserFuncASTNodeData data;
		data.symbol = NULL;
		return parser_new_node(
			ctx, type, type_name, token, sizeof(BeParserFuncASTNodeData), &data
		);
	} else if (type == BE_NODE_FUNC_PARAMS_ITEM) {
		BeParserFuncParamASTNodeData data;
		data.symbol = NULL;
		return parser_new_node(
			ctx, type, type_name, token, sizeof(BeParserFuncParamASTNodeData), &data
		);
	} else if (type == BE_NODE_STRUCT) {
		BeParserStructASTNodeData data;

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x3d9a3
jmp 0x3d9c2
leaq 0x427b7(%rip), %rdi     # 0x80161
leaq 0x420ff(%rip), %rsi     # 0x7fab0
movl $0x18, %edx
leaq 0x4274f(%rip), %rcx     # 0x8010c
callq 0x30a0
cmpq $0x0, -0x20(%rbp)
je 0x3d9cb
jmp 0x3d9ea
leaq 0x42783(%rip), %rdi     # 0x80155
leaq 0x420d7(%rip), %rsi     # 0x7fab0
movl $0x19, %edx
leaq 0x42727(%rip), %rcx     # 0x8010c
callq 0x30a0
movl -0x14(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
cmpl $0xe00, %eax            # imm = 0xE00
jne 0x3da48
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 0x3db98
cmpl $0xc00, -0x14(%rbp)     # imm = 0xC00
jne 0x3da8b
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 0x3db98
cmpl $0xc01, -0x14(%rbp)     # imm = 0xC01
jne 0x3dac3
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 0x3db98
cmpl $0xa00, -0x14(%rbp)     # imm = 0xA00
jne 0x3dafb
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 0x3db98
cmpl $0xa02, -0x14(%rbp)     # imm = 0xA02
jne 0x3db36
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 0x3db98
cmpl $0xd00, -0x14(%rbp)     # imm = 0xD00
jne 0x3db78
movq $0x0, -0x98(%rbp)
movb $0x0, -0x90(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x10, %r8d
leaq -0x98(%rbp), %r9
callq 0x79f0
movq %rax, -0x8(%rbp)
jmp 0x3db98
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 $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)