// File: /workspace/github_c_makefile_star2_O0/michaelforney[P]cproc/pp.c
// Function: directive
static void
directive(void)
{
	struct location newloc;
	enum ppflags oldflags;
	char *name = NULL;

	scan(&tok);
	if (tok.kind == TNEWLINE)
		return;  /* empty directive */
	oldflags = ppflags;
	ppflags |= PPNEWLINE;
	if (tok.kind == TNUMBER)
		goto line;  /* gcc line markers */
	name = tokencheck(&tok, TIDENT, "newline, or number after '#'");
	if (strcmp(name, "if") == 0) {
		error(&tok.loc, "#if directive is not implemented");
	} else if (strcmp(name, "ifdef") == 0) {
		error(&tok.loc, "#ifdef directive is not implemented");
	} else if (strcmp(name, "ifndef") == 0) {
		error(&tok.loc, "#ifndef directive is not implemented");
	} else if (strcmp(name, "elif") == 0) {
		error(&tok.loc, "#elif directive is not implemented");
	} else if (strcmp(name, "endif") == 0) {
		error(&tok.loc, "#endif directive is not implemented");
	} else if (strcmp(name, "include") == 0) {
		error(&tok.loc, "#include directive is not implemented");
	} else if (strcmp(name, "define") == 0) {
		scan(&tok);
		define();
	} else if (strcmp(name, "undef") == 0) {
		scan(&tok);
		undef();
	} else if (strcmp(name, "line") == 0) {
		scan(&tok);
		tokencheck(&tok, TNUMBER, "after #line");
line:
		newloc.line = strtoull(tok.lit, NULL, 0);
		newloc.col = 1;
		scan(&tok);
		newloc.file = tok.loc.file;
		if (tok.kind == TSTRINGLIT) {
			/* XXX: handle escape sequences (reuse string decoding from expr.c) */
			newloc.file = strchr(tok.lit, '"') + 1;
			*strchr(newloc.file, '"') = '\0';
			scan(&tok);
		}
		while (tok.kind == TNUMBER)
			scan(&tok);
		scansetloc(newloc);
	} else if (strcmp(name, "error") == 0) {
		error(&tok.loc, "#error directive is not implemented");
	} else if (strcmp(name, "pragma") == 0) {
		while (tok.kind != TNEWLINE && tok.kind != TEOF)
			next();
	} else {
		error(&tok.loc, "invalid preprocessor directive #%s", name);
	}
	free(name);
	tokencheck(&tok, TNEWLINE, "after preprocessing directive");
	ppflags = oldflags;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq $0x0, -0x28(%rbp)
leaq 0x144b1(%rip), %rdi     # 0x221a8
callq 0xefb0
leaq 0x144a5(%rip), %rax     # 0x221a8
cmpl $0x2, (%rax)
jne 0xdd0d
jmp 0xe0b2
movl 0x14375(%rip), %eax     # 0x22088
movl %eax, -0x1c(%rbp)
movl 0x1436c(%rip), %eax     # 0x22088
orl $0x1, %eax
movl %eax, 0x14363(%rip)     # 0x22088
leaq 0x1447c(%rip), %rax     # 0x221a8
cmpl $0x5, (%rax)
jne 0xdd36
jmp 0xdf17
leaq 0x1446b(%rip), %rdi     # 0x221a8
movl $0x4, %esi
leaq 0xce0e(%rip), %rdx      # 0x1ab57
callq 0x10f20
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0xceb9(%rip), %rsi      # 0x1ac16
callq 0x3160
cmpl $0x0, %eax
jne 0xdd85
leaq 0x1443a(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xcdfb(%rip), %rsi      # 0x1ab74
movb $0x0, %al
callq 0x11190
jmp 0xe088
movq -0x28(%rbp), %rdi
leaq 0xce05(%rip), %rsi      # 0x1ab95
callq 0x3160
cmpl $0x0, %eax
jne 0xddb8
leaq 0x14407(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xcdef(%rip), %rsi      # 0x1ab9b
movb $0x0, %al
callq 0x11190
jmp 0xe086
movq -0x28(%rbp), %rdi
leaq 0xcdfc(%rip), %rsi      # 0x1abbf
callq 0x3160
cmpl $0x0, %eax
jne 0xddeb
leaq 0x143d4(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xcde7(%rip), %rsi      # 0x1abc6
movb $0x0, %al
callq 0x11190
jmp 0xe084
movq -0x28(%rbp), %rdi
leaq 0xcdf5(%rip), %rsi      # 0x1abeb
callq 0x3160
cmpl $0x0, %eax
jne 0xde1e
leaq 0x143a1(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xcdde(%rip), %rsi      # 0x1abf0
movb $0x0, %al
callq 0x11190
jmp 0xe082
movq -0x28(%rbp), %rdi
leaq 0xcdea(%rip), %rsi      # 0x1ac13
callq 0x3160
cmpl $0x0, %eax
jne 0xde51
leaq 0x1436e(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xcdd4(%rip), %rsi      # 0x1ac19
movb $0x0, %al
callq 0x11190
jmp 0xe080
movq -0x28(%rbp), %rdi
leaq 0xcde1(%rip), %rsi      # 0x1ac3d
callq 0x3160
cmpl $0x0, %eax
jne 0xde84
leaq 0x1433b(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xcdcd(%rip), %rsi      # 0x1ac45
movb $0x0, %al
callq 0x11190
jmp 0xe07e
movq -0x28(%rbp), %rdi
leaq 0xce61(%rip), %rsi      # 0x1acf0
callq 0x3160
cmpl $0x0, %eax
jne 0xdeaf
leaq 0x14308(%rip), %rdi     # 0x221a8
callq 0xefb0
callq 0xe0c0
jmp 0xe07c
movq -0x28(%rbp), %rdi
leaq 0xcf4e(%rip), %rsi      # 0x1ae08
callq 0x3160
cmpl $0x0, %eax
jne 0xdeda
leaq 0x142dd(%rip), %rdi     # 0x221a8
callq 0xefb0
callq 0xe4c0
jmp 0xe07a
movq -0x28(%rbp), %rdi
leaq 0xcd8d(%rip), %rsi      # 0x1ac72
callq 0x3160
cmpl $0x0, %eax
jne 0xdfdd
leaq 0x142ae(%rip), %rdi     # 0x221a8
callq 0xefb0
leaq 0x142a2(%rip), %rdi     # 0x221a8
movl $0x5, %esi
leaq 0xcd59(%rip), %rdx      # 0x1ac6b
callq 0x10f20
leaq 0x1428a(%rip), %rax     # 0x221a8
movq 0x20(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x3150
movq %rax, -0x10(%rbp)
movq $0x1, -0x8(%rbp)
leaq 0x14268(%rip), %rdi     # 0x221a8
callq 0xefb0
leaq 0x1425c(%rip), %rax     # 0x221a8
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
leaq 0x1424d(%rip), %rax     # 0x221a8
cmpl $0x7, (%rax)
jne 0xdf9a
leaq 0x14241(%rip), %rax     # 0x221a8
movq 0x20(%rax), %rdi
movl $0x22, %esi
callq 0x30b0
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movl $0x22, %esi
callq 0x30b0
movb $0x0, (%rax)
leaq 0x14213(%rip), %rdi     # 0x221a8
callq 0xefb0
jmp 0xdf9c
leaq 0x14205(%rip), %rax     # 0x221a8
cmpl $0x5, (%rax)
jne 0xdfb6
leaq 0x141f9(%rip), %rdi     # 0x221a8
callq 0xefb0
jmp 0xdf9c
leaq -0x18(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xef80
jmp 0xe078
movq -0x28(%rbp), %rdi
leaq 0xcc8f(%rip), %rsi      # 0x1ac77
callq 0x3160
cmpl $0x0, %eax
jne 0xe00d
leaq 0x141af(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xcc79(%rip), %rsi      # 0x1ac7d
movb $0x0, %al
callq 0x11190
jmp 0xe076
movq -0x28(%rbp), %rdi
leaq 0xcc89(%rip), %rsi      # 0x1aca1
callq 0x3160
cmpl $0x0, %eax
jne 0xe057
jmp 0xe024
xorl %eax, %eax
leaq 0x1417b(%rip), %rcx     # 0x221a8
cmpl $0x2, (%rcx)
movb %al, -0x29(%rbp)
je 0xe045
leaq 0x1416c(%rip), %rax     # 0x221a8
cmpl $0x1, (%rax)
setne %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0xe04e
jmp 0xe055
callq 0xd540
jmp 0xe024
jmp 0xe074
movq -0x28(%rbp), %rdx
leaq 0x14146(%rip), %rdi     # 0x221a8
addq $0x8, %rdi
leaq 0xcc3b(%rip), %rsi      # 0x1aca8
movb $0x0, %al
callq 0x11190
jmp 0xe076
jmp 0xe078
jmp 0xe07a
jmp 0xe07c
jmp 0xe07e
jmp 0xe080
jmp 0xe082
jmp 0xe084
jmp 0xe086
jmp 0xe088
movq -0x28(%rbp), %rdi
callq 0x3260
leaq 0x14110(%rip), %rdi     # 0x221a8
movl $0x2, %esi
leaq 0xcc27(%rip), %rdx      # 0x1accb
callq 0x10f20
movl -0x1c(%rbp), %eax
movl %eax, 0x13fd6(%rip)     # 0x22088
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)