// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/pre-process.c
// Function: parse_expansion
static struct token *parse_expansion(struct token *expansion, struct token *arglist, struct ident *name)
{
	struct token *token = expansion;
	struct token **p;

	if (match_op(token, SPECIAL_HASHHASH))
		goto Econcat;

	for (p = &expansion; !eof_token(token); p = &token->next, token = *p) {
		if (match_op(token, '#')) {
			token = handle_hash(p, arglist);
			if (!token)
				return NULL;
		}
		if (match_op(token->next, SPECIAL_HASHHASH)) {
			token = handle_hashhash(token, arglist);
			if (!token)
				return NULL;
		} else {
			try_arg(token, TOKEN_MACRO_ARGUMENT, arglist);
		}
		switch (token_type(token)) {
		case TOKEN_ERROR:
			goto Earg;

		case TOKEN_STRING:
		case TOKEN_WIDE_STRING:
			token->string->immutable = 1;
			break;
		}
	}
	token = alloc_token(&expansion->pos);
	token_type(token) = TOKEN_UNTAINT;
	token->ident = name;
	token->next = *p;
	*p = token;
	return expansion;

Econcat:
	sparse_error(token->pos, "'##' cannot appear at the ends of macro expansion");
	return NULL;
Earg:
	sparse_error(token->pos, "too many instances of argument in body");
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl $0x111, %esi            # imm = 0x111
callq 0x2c380
cmpl $0x0, %eax
je 0x2c134
jmp 0x2c289
leaq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x8087d(%rip), %rax     # 0xac9c0
cmpq %rax, -0x28(%rbp)
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2c155
jmp 0x2c23a
movq -0x28(%rbp), %rdi
movl $0x23, %esi
callq 0x2c380
cmpl $0x0, %eax
je 0x2c18f
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2c3c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x2c18d
movq $0x0, -0x8(%rbp)
jmp 0x2c2c5
jmp 0x2c18f
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x111, %esi            # imm = 0x111
callq 0x2c380
cmpl $0x0, %eax
je 0x2c1cd
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2c4b0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x2c1cb
movq $0x0, -0x8(%rbp)
jmp 0x2c2c5
jmp 0x2c1df
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x15, %esi
callq 0x2c650
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0x3f, %eax
movl %eax, -0x34(%rbp)
subl $0x2, %eax
je 0x2c1ff
jmp 0x2c1f2
movl -0x34(%rbp), %eax
addl $-0x10, %eax
subl $0x2, %eax
jb 0x2c204
jmp 0x2c21c
jmp 0x2c2a8
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, (%rax)
jmp 0x2c21e
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2c13c
movq -0x10(%rbp), %rdi
callq 0x2c800
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rcx
andq $-0x40, %rcx
orq $0x1a, %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2c2c5
movq -0x28(%rbp), %rax
movq (%rax), %rdi
leaq 0x3b578(%rip), %rsi     # 0x6780f
movb $0x0, %al
callq 0x16f90
movq $0x0, -0x8(%rbp)
jmp 0x2c2c5
movq -0x28(%rbp), %rax
movq (%rax), %rdi
leaq 0x3b58b(%rip), %rsi     # 0x67841
movb $0x0, %al
callq 0x16f90
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop