// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/preprocessor/gen.c
// Function: gen_error
static void _gen_error(
	PPGeneratorContext *ctx,
	ParserASTNode *node
) {
	assert(ctx);
	assert(node);
	assert(node->type == PP_NODE_DIRECTIVE_ERROR);
	assert(node->nchilds == 0);

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

	char cmd[] = "#error";
	ResizableString temp;
	rstr_init(&temp);
	int idx = sizeof(cmd);

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

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

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

	fprintf(stderr, "%s\n", RSTR_CSTR(&temp));

	rstr_free(&temp);

	exit(PP_DIRECTIVE_ERROR_EXIT_CODE);

	#undef	_GET_CHAR
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3f2c9
jmp 0x3f2e8
leaq 0xe891(%rip), %rdi      # 0x4db61
leaq 0xfc1e(%rip), %rsi      # 0x4eef5
movl $0x357, %edx            # imm = 0x357
leaq 0x106e3(%rip), %rcx     # 0x4f9c6
callq 0xa0b0
cmpq $0x0, -0x10(%rbp)
je 0x3f2f1
jmp 0x3f310
leaq 0xbd8f(%rip), %rdi      # 0x4b087
leaq 0xfbf6(%rip), %rsi      # 0x4eef5
movl $0x358, %edx            # imm = 0x358
leaq 0x106bb(%rip), %rcx     # 0x4f9c6
callq 0xa0b0
movq -0x10(%rbp), %rax
cmpl $0x20c, (%rax)          # imm = 0x20C
jne 0x3f31e
jmp 0x3f33d
leaq 0x106d8(%rip), %rdi     # 0x4f9fd
leaq 0xfbc9(%rip), %rsi      # 0x4eef5
movl $0x359, %edx            # imm = 0x359
leaq 0x1068e(%rip), %rcx     # 0x4f9c6
callq 0xa0b0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0x3f349
jmp 0x3f368
leaq 0x105fc(%rip), %rdi     # 0x4f94c
leaq 0xfb9e(%rip), %rsi      # 0x4eef5
movl $0x35a, %edx            # imm = 0x35A
leaq 0x10663(%rip), %rcx     # 0x4f9c6
callq 0xa0b0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x4(%rax), %eax
movl %eax, -0x1c(%rbp)
movl 0x10697(%rip), %eax     # 0x4fa23
movl %eax, -0x23(%rbp)
movw 0x10691(%rip), %ax      # 0x4fa27
movw %ax, -0x1f(%rbp)
movb 0x10689(%rip), %al      # 0x4fa29
movb %al, -0x1d(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xfca0
movl $0x7, -0x3c(%rbp)
callq 0xa1a0
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x3f3d1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x4c(%rbp)
jmp 0x3f3e0
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x4c(%rbp)
movq -0x48(%rbp), %rax
movl -0x4c(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x3f403
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3f3b3
jmp 0x3f405
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x3f417
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x50(%rbp)
jmp 0x3f426
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl $-0x1, %eax
je 0x3f469
movl -0x3c(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jl 0x3f440
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x54(%rbp)
jmp 0x3f44f
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
leaq -0x38(%rbp), %rdi
movsbl %al, %esi
callq 0xfeb0
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3f405
movq 0x18b88(%rip), %rax     # 0x57ff8
movq (%rax), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x3f48b
leaq 0x8402(%rip), %rax      # 0x47887
movq %rax, -0x68(%rbp)
jmp 0x3f493
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
movq -0x68(%rbp), %rdx
leaq 0x709f(%rip), %rsi      # 0x46541
movb $0x0, %al
callq 0xa100
leaq -0x38(%rbp), %rdi
callq 0x10320
movl $0xea, %edi
callq 0xa180
nopl (%rax)