// File: /workspace/github_c_makefile_star2_O3/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 0x1f928
movl 0x10(%rax), %eax
andl $0x3ff, %eax            # imm = 0x3FF
jmp 0x1f92a
xorl %eax, %eax
leal 0xf(,%rax,8), %eax
andl $-0x10, %eax
movq %rsp, %r12
subq %rax, %r12
movq %r12, %rsp
movq 0x18(%rbx), %rdi
callq 0x2de35
leaq 0x26a59(%rip), %rdi     # 0x463a6
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
movq 0x50(%rbx), %r14
testq %r14, %r14
je 0x1fa03
movq %rbx, -0x30(%rbp)
movl $0x28, %edi
callq 0xe040
cmpq 0x4056f(%rip), %r14     # 0x5fee8
je 0x1f9f5
leaq 0x20f4b(%rip), %r13     # 0x408cd
leaq 0x66c57(%rip), %rbx     # 0x865e0
xorl %r15d, %r15d
movq (%r14), %rax
andl $0x3f, %eax
cmpq $0x1b, %rax
je 0x1f9d7
cmpl $0x3, %eax
jne 0x1f9aa
leaq 0x44a84(%rip), %rax     # 0x64428
cmpq %rax, 0x10(%r14)
je 0x1f9e2
movq %r14, %rdi
callq 0x2df90
leaq 0x23b1f(%rip), %rdi     # 0x434d8
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe0f0
movslq %r15d, %rax
incl %r15d
movq %r14, (%r12,%rax,8)
leaq 0x21cbf(%rip), %r13     # 0x41696
movq 0x8(%r14), %r14
cmpq %rbx, %r14
jne 0x1f98c
jmp 0x1f9f5
leaq 0x269c8(%rip), %rdi     # 0x463b1
movq %r13, %rsi
xorl %eax, %eax
callq 0xe0f0
jmp 0x1f9c6
movl $0x29, %edi
callq 0xe040
movq -0x30(%rbp), %rbx
movq 0x48(%rbx), %r15
movq (%r15), %rax
movl %eax, %ecx
andl $0x3f, %ecx
cmpl $0x1a, %ecx
je 0x1fa99
leaq 0x2ba1e(%rip), %rbx     # 0x4b43d
leaq 0x262e2(%rip), %r13     # 0x45d08
movq 0x8(%r15), %r14
btl $0x15, %eax
jae 0x1fa3d
movl $0x20, %edi
callq 0xe040
movq (%r15), %rax
andl $0x3f, %eax
addl $-0x15, %eax
cmpl $0x3, %eax
ja 0x1fa64
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movl $0x23, %edi
callq 0xe040
movslq 0x10(%r15), %rax
movq (%r12,%rax,8), %r15
movq %r15, %rdi
callq 0x2df90
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
jmp 0x1fa89
leaq 0x26935(%rip), %rdi     # 0x463b7
xorl %eax, %eax
callq 0xe0f0
movq (%r14), %rax
movl %eax, %ecx
andl $0x3f, %ecx
movq %r14, %r15
cmpl $0x1a, %ecx
jne 0x1fa26
movl $0xa, %edi
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe040