// File: /workspace/github_c_makefile_star2_O1/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 0x1f89b
movl 0x10(%rax), %eax
andl $0x3ff, %eax            # imm = 0x3FF
jmp 0x1f89d
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 0x2e465
leaq 0x27b66(%rip), %rdi     # 0x47426
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
movq 0x50(%rbx), %r14
testq %r14, %r14
je 0x1f976
movq %rbx, -0x30(%rbp)
movl $0x28, %edi
callq 0xe040
cmpq 0x415ec(%rip), %r14     # 0x60ed8
je 0x1f968
leaq 0x21fd8(%rip), %r13     # 0x418cd
leaq 0x67ce4(%rip), %rbx     # 0x875e0
xorl %r15d, %r15d
movq (%r14), %rax
andl $0x3f, %eax
cmpq $0x1b, %rax
je 0x1f94a
cmpl $0x3, %eax
jne 0x1f91d
leaq 0x45b11(%rip), %rax     # 0x65428
cmpq %rax, 0x10(%r14)
je 0x1f955
movq %r14, %rdi
callq 0x2e5c0
leaq 0x24bec(%rip), %rdi     # 0x44518
movq %r13, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0xe0f0
movslq %r15d, %rax
incl %r15d
movq %r14, (%r12,%rax,8)
leaq 0x22d7c(%rip), %r13     # 0x426c6
movq 0x8(%r14), %r14
cmpq %rbx, %r14
jne 0x1f8ff
jmp 0x1f968
leaq 0x27ad5(%rip), %rdi     # 0x47431
movq %r13, %rsi
xorl %eax, %eax
callq 0xe0f0
jmp 0x1f939
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 0x1fa0c
leaq 0x2cb3b(%rip), %rbx     # 0x4c4cd
leaq 0x273af(%rip), %r13     # 0x46d48
movq 0x8(%r15), %r14
btl $0x15, %eax
jae 0x1f9ad
movl $0x20, %edi
callq 0xe040
movl (%r15), %eax
andl $0x3f, %eax
addl $-0x15, %eax
cmpl $0x3, %eax
ja 0x1f9d7
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 0x2e5c0
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xe0f0
jmp 0x1f9fc
leaq 0x27a42(%rip), %rdi     # 0x47437
xorl %eax, %eax
callq 0xe0f0
movq (%r14), %rax
movl %eax, %ecx
andl $0x3f, %ecx
movq %r14, %r15
cmpl $0x1a, %ecx
jne 0x1f999
movl $0xa, %edi
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe040