// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/pre-process.c
// Function: dump_macro
static void dump_macro(struct symbol *sym)
{
	int nargs = sym->arglist ? sym->arglist->count.normal : 0;
	struct token *args[nargs];
	struct token *token;

	printf("#define %s", show_ident(sym->ident));
	token = sym->arglist;
	if (token) {
		const char *sep = "";
		int narg = 0;
		putchar('(');
		for (; !eof_token(token); token = token->next) {
			if (token_type(token) == TOKEN_ARG_COUNT)
				continue;
			if (is_VA_ARGS_token(token))
				printf("%s...", sep);
			else
				printf("%s%s", sep, show_token(token));
			args[narg++] = token;
			sep = ",";
		}
		putchar(')');
	}

	token = sym->expansion;
	while (token_type(token) != TOKEN_UNTAINT) {
		struct token *next = token->next;
		if (token->pos.whitespace)
			putchar(' ');
		switch (token_type(token)) {
		case TOKEN_CONCAT:
			printf("##");
			break;
		case TOKEN_STR_ARGUMENT:
			printf("#");
			/* fall-through */
		case TOKEN_QUOTED_ARGUMENT:
		case TOKEN_MACRO_ARGUMENT:
			token = args[token->argnum];
			/* fall-through */
		default:
			printf("%s", show_token(token));
		}
		token = next;
	}
	putchar('\n');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x50(%rdi), %rax
testq %rax, %rax
je 0x1cfc3
movl 0x10(%rax), %eax
andl $0x3ff, %eax            # imm = 0x3FF
jmp 0x1cfc5
xorl %eax, %eax
leal 0xf(,%rax,8), %eax
andl $-0x10, %eax
movq %rsp, %r15
subq %rax, %r15
movq %r15, %rsp
movq 0x18(%rbx), %rdi
callq 0x2936d
leaq 0x2241e(%rip), %rdi     # 0x3f406
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
movq 0x50(%rbx), %r14
testq %r14, %r14
je 0x1d091
movq %rbx, -0x30(%rbp)
pushq $0x28
popq %rdi
callq 0xe040
leaq 0x1c8bb(%rip), %r13     # 0x398cd
leaq 0x635c7(%rip), %rbx     # 0x805e0
xorl %r12d, %r12d
cmpq %rbx, %r14
je 0x1d085
movq (%r14), %rax
andl $0x3f, %eax
cmpq $0x1b, %rax
je 0x1d06c
cmpl $0x3, %eax
jne 0x1d03f
leaq 0x413ef(%rip), %rax     # 0x5e428
cmpq %rax, 0x10(%r14)
je 0x1d072
movq %r14, %rdi
callq 0x294bb
leaq 0x1f4ea(%rip), %rdi     # 0x3c538
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe0f0
movslq %r12d, %rax
incl %r12d
movq %r14, (%r15,%rax,8)
leaq 0x1d68a(%rip), %r13     # 0x3a6f6
movq 0x8(%r14), %r14
jmp 0x1d01c
leaq 0x22398(%rip), %rdi     # 0x3f411
movq %r13, %rsi
xorl %eax, %eax
callq 0xe0f0
jmp 0x1d05b
pushq $0x29
popq %rdi
callq 0xe040
movq -0x30(%rbp), %rbx
movq 0x48(%rbx), %r13
leaq 0x275f1(%rip), %rbx     # 0x4468d
leaq 0x21cc5(%rip), %r14     # 0x3ed68
movq (%r13), %rax
movl %eax, %ecx
andl $0x3f, %ecx
cmpl $0x1a, %ecx
je 0x1d118
movq 0x8(%r13), %r12
btl $0x15, %eax
jae 0x1d0c7
pushq $0x20
popq %rdi
callq 0xe040
movq (%r13), %rax
andl $0x3f, %eax
addl $-0x15, %eax
cmpl $0x3, %eax
ja 0x1d0eb
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
pushq $0x23
popq %rdi
callq 0xe040
movslq 0x10(%r13), %rax
movq (%r15,%rax,8), %r13
movq %r13, %rdi
callq 0x294bb
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
movq %r12, %r13
jmp 0x1d0a3
leaq 0x2230b(%rip), %rdi     # 0x3f417
xorl %eax, %eax
callq 0xe0f0
movq %r12, %r13
jmp 0x1d0a3
pushq $0xa
popq %rdi
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe040