// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/pre-process.c
// Function: handle_hashhash
static struct token *handle_hashhash(struct token *token, struct token *arglist)
{
	struct token *last = token;
	struct token *concat;
	int state = match_op(token, ',');
	
	try_arg(token, TOKEN_QUOTED_ARGUMENT, arglist);

	while (1) {
		struct token *t;
		int is_arg;

		/* eat duplicate ## */
		concat = token->next;
		while (match_op(t = concat->next, SPECIAL_HASHHASH)) {
			token->next = t;
			__free_token(concat);
			concat = t;
		}
		token_type(concat) = TOKEN_CONCAT;

		if (eof_token(t))
			goto Econcat;

		if (match_op(t, '#')) {
			t = handle_hash(&concat->next, arglist);
			if (!t)
				return NULL;
		}

		is_arg = try_arg(t, TOKEN_QUOTED_ARGUMENT, arglist);

		if (state == 1 && is_arg) {
			state = is_arg;
		} else {
			last = t;
			state = match_op(t, ',');
		}

		token = t;
		if (!match_op(token->next, SPECIAL_HASHHASH))
			break;
	}
	/* handle GNU ,##__VA_ARGS__ kludge, in all its weirdness */
	if (state == 2)
		token_type(last) = TOKEN_GNU_KLUDGE;
	return token;

Econcat:
	sparse_error(concat->pos, "'##' cannot appear at the ends of macro expansion");
	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2c, %esi
callq 0x2c380
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x17, %esi
callq 0x2c650
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq %rdi, -0x38(%rbp)
movl $0x111, %esi            # imm = 0x111
callq 0x2c380
cmpl $0x0, %eax
je 0x2c531
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rdi
callq 0x469b0
movq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x2c4f7
movq -0x28(%rbp), %rax
movq (%rax), %rcx
andq $-0x40, %rcx
orq $0x18, %rcx
movq %rcx, (%rax)
leaq 0x80476(%rip), %rax     # 0xac9c0
cmpq %rax, -0x38(%rbp)
jne 0x2c555
jmp 0x2c61d
movq -0x38(%rbp), %rdi
movl $0x23, %esi
callq 0x2c380
cmpl $0x0, %eax
je 0x2c593
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0x2c3c0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x2c591
movq $0x0, -0x8(%rbp)
jmp 0x2c63a
jmp 0x2c593
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x17, %esi
callq 0x2c650
movl %eax, -0x3c(%rbp)
cmpl $0x1, -0x2c(%rbp)
jne 0x2c5bc
cmpl $0x0, -0x3c(%rbp)
je 0x2c5bc
movl -0x3c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0x2c5d5
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x38(%rbp), %rdi
movl $0x2c, %esi
callq 0x2c380
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x111, %esi            # imm = 0x111
callq 0x2c380
cmpl $0x0, %eax
jne 0x2c5f6
jmp 0x2c5fb
jmp 0x2c4eb
cmpl $0x2, -0x2c(%rbp)
jne 0x2c613
movq -0x20(%rbp), %rax
movq (%rax), %rcx
andq $-0x40, %rcx
orq $0x19, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2c63a
movq -0x28(%rbp), %rax
movq (%rax), %rdi
leaq 0x3b1e4(%rip), %rsi     # 0x6780f
movb $0x0, %al
callq 0x16f90
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)