// File: /workspace/github_c_makefile_star2_O3/Ihsoh[P]ilang/compiler/preprocessor/gen.c
// Function: gen_elifxdef
static bool _gen_elifxdef(
	PPGeneratorContext *ctx,
	ParserASTNode *node,
	bool not
) {
	assert(ctx);
	assert(node);
	if (not) {
		assert(node->type == PP_NODE_DIRECTIVE_ELIFNDEF);
	} else {
		assert(node->type == PP_NODE_DIRECTIVE_ELIFDEF);
	}
	assert(node->nchilds == 1);

	const char *content = node->token->content;
	int len = node->token->len;

	ResizableString key;
	rstr_init(&key);
	int idx;
	if (not) {
		char cmd[] = "#elifndef";
		idx = sizeof(cmd);
	} else {
		char cmd[] = "#elifdef";
		idx = sizeof(cmd);
	}

	#define	_GET_CHAR(i) ((i) >= len ? -1 : content[(i)])

	while (isspace(_GET_CHAR(idx))) {
		idx++;
	}

	while (_GET_CHAR(idx) != -1 && !isspace(_GET_CHAR(idx))) {
		rstr_append_with_char(&key, _GET_CHAR(idx));
		idx++;
	}

	if (RSTR_LEN(&key) == 0) {
		_SYNERR_NODE(ctx, node, "expect key.");
	}

	bool cond;
	if (not) {
		cond = !map_exists_key(ctx->map_kv, &key);
	} else {
		cond = map_exists_key(ctx->map_kv, &key);
	}

	if (cond) {
		ParserASTNode *node_block = node->childs[0];
		assert(node_block->type == PP_NODE_BLOCK);

		_gen_if_block(ctx, node_block);
	}

	rstr_free(&key);

	#undef	_GET_CHAR

	return cond;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movl %edx, %r15d
movl (%rsi), %eax
testl %edx, %edx
je 0x29b35
cmpl $0x208, %eax            # imm = 0x208
je 0x29b40
leaq 0xc35e(%rip), %rdi      # 0x35e7b
leaq 0xbe08(%rip), %rsi      # 0x3592c
leaq 0xc30e(%rip), %rcx      # 0x35e39
movl $0x1f2, %edx            # imm = 0x1F2
callq 0xa0b0
cmpl $0x207, %eax            # imm = 0x207
jne 0x29c80
movq %rdi, -0x50(%rbp)
cmpl $0x1, 0x44(%rsi)
jne 0x29c61
movq %rsi, -0x48(%rbp)
movq 0x10(%rsi), %rax
movq 0x8(%rax), %r14
movslq 0x4(%rax), %rbx
leaq -0x40(%rbp), %rdi
callq 0xe274
callq 0xa190
movq %rax, %r12
movq (%rax), %rax
movl %r15d, -0x2c(%rbp)
movzbl %r15b, %r15d
addq %r15, %r14
addq $0x8, %r14
addq $0x9, %r15
movq $-0x1, %rcx
cmpq %rbx, %r15
jge 0x29b96
movsbq 0x1(%r14), %rcx
incq %r15
incq %r14
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x29b85
leal -0x1(%r15), %eax
cmpl %eax, %ebx
jle 0x29bda
decl %r15d
leaq -0x40(%rbp), %r13
movsbq (%r14), %rsi
cmpq $-0x1, %rsi
je 0x29bda
movq (%r12), %rax
testb $0x20, 0x1(%rax,%rsi,2)
jne 0x29bda
movq %r13, %rdi
callq 0xe3fa
incq %r14
incl %r15d
cmpl %r15d, %ebx
jg 0x29bb2
cmpl $0x0, -0x3c(%rbp)
movq -0x50(%rbp), %rbx
movq -0x48(%rbp), %r14
jne 0x29c0c
movabsq $0x6b20746365707865, %rax # imm = 0x6B20746365707865
leaq -0x450(%rbp), %rdx
movq %rax, (%rdx)
movl $0x2e7965, 0x8(%rdx)    # imm = 0x2E7965
movq (%rbx), %rdi
movq %r14, %rsi
callq *0x58(%rdi)
movq 0x18(%rbx), %rdi
leaq -0x40(%rbp), %rsi
callq 0xc82a
cmpb $0x0, -0x2c(%rbp)
je 0x29c27
testb %al, %al
je 0x29c2b
xorl %ebx, %ebx
jmp 0x29c44
testb %al, %al
je 0x29c23
movq 0x48(%r14), %rax
movq (%rax), %rsi
cmpl $0x300, (%rsi)          # imm = 0x300
jne 0x29c9f
movq %rbx, %rdi
callq 0x2979d
movb $0x1, %bl
leaq -0x40(%rbp), %rdi
callq 0xe772
movl %ebx, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7a32(%rip), %rdi      # 0x3169a
leaq 0xbcbd(%rip), %rsi      # 0x3592c
leaq 0xc1c3(%rip), %rcx      # 0x35e39
movl $0x1f6, %edx            # imm = 0x1F6
callq 0xa0b0
leaq 0xc21d(%rip), %rdi      # 0x35ea4
leaq 0xbc9e(%rip), %rsi      # 0x3592c
leaq 0xc1a4(%rip), %rcx      # 0x35e39
movl $0x1f4, %edx            # imm = 0x1F4
callq 0xa0b0
leaq 0xc0b1(%rip), %rdi      # 0x35d57
leaq 0xbc7f(%rip), %rsi      # 0x3592c
leaq 0xc185(%rip), %rcx      # 0x35e39
movl $0x21e, %edx            # imm = 0x21E
callq 0xa0b0