// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/pre-process.c
// Function: collect_arg
static struct token *collect_arg(struct token *prev, int vararg, struct position *pos, int count)
{
	struct stream *stream = input_streams + prev->pos.stream;
	struct token **p = &prev->next;
	struct token *next;
	int nesting = 0;

	while (!eof_token(next = scan_next(p))) {
		if (next->pos.newline && match_op(next, '#')) {
			if (!next->pos.noexpand) {
				preprocessor_line(stream, p);
				__free_token(next);	/* Free the '#' token */
				continue;
			}
		}
		switch (token_type(next)) {
		case TOKEN_STREAMEND:
		case TOKEN_STREAMBEGIN:
			*p = &eof_token_entry;
			return next;
		case TOKEN_STRING:
		case TOKEN_WIDE_STRING:
			if (count > 1)
				next->string->immutable = 1;
			break;
		}
		if (false_nesting) {
			*p = next->next;
			__free_token(next);
			continue;
		}
		if (match_op(next, '(')) {
			nesting++;
		} else if (match_op(next, ')')) {
			if (!nesting--)
				break;
		} else if (match_op(next, ',') && !nesting && !vararg) {
			break;
		}
		next->pos.stream = pos->stream;
		next->pos.line = pos->line;
		next->pos.pos = pos->pos;
		next->pos.newline = 0;
		p = &next->next;
	}
	*p = &eof_token_entry;
	return next;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
leaq 0x64c5b(%rip), %rax     # 0x94388
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
shrq $0x6, %rcx
andq $0x3fff, %rcx           # imm = 0x3FFF
movslq %ecx, %rcx
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x38(%rbp), %rdi
callq 0x2eaf0
movq %rax, -0x40(%rbp)
leaq 0x7d249(%rip), %rcx     # 0xac9c0
cmpq %rcx, %rax
sete %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2f788
jmp 0x2f9a1
movq -0x40(%rbp), %rax
movq (%rax), %rax
shrq $0x14, %rax
andq $0x1, %rax
cmpl $0x0, %eax
je 0x2f7d9
movq -0x40(%rbp), %rdi
movl $0x23, %esi
callq 0x2c380
cmpl $0x0, %eax
je 0x2f7d9
movq -0x40(%rbp), %rax
movq (%rax), %rax
shrq $0x3f, %rax
cmpl $0x0, %eax
jne 0x2f7d7
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2f9d0
movq -0x40(%rbp), %rdi
callq 0x469b0
jmp 0x2f763
jmp 0x2f7d9
movq -0x40(%rbp), %rax
movl (%rax), %eax
andl $0x3f, %eax
movl %eax, -0x48(%rbp)
addl $-0x10, %eax
subl $0x2, %eax
jb 0x2f817
jmp 0x2f7ef
movl -0x48(%rbp), %eax
addl $-0x13, %eax
subl $0x1, %eax
ja 0x2f837
jmp 0x2f7fc
movq -0x38(%rbp), %rax
leaq 0x7d1b9(%rip), %rcx     # 0xac9c0
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2f9b7
cmpl $0x1, -0x24(%rbp)
jle 0x2f835
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %ecx
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
orl $0x80000000, %ecx       # imm = 0x80000000
movl %ecx, (%rax)
jmp 0x2f837
cmpl $0x0, 0x5fd06(%rip)     # 0x8f544
je 0x2f85d
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rdi
callq 0x469b0
jmp 0x2f763
movq -0x40(%rbp), %rdi
movl $0x28, %esi
callq 0x2c380
cmpl $0x0, %eax
je 0x2f87b
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x2f8cd
movq -0x40(%rbp), %rdi
movl $0x29, %esi
callq 0x2c380
cmpl $0x0, %eax
je 0x2f8a5
movl -0x44(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x44(%rbp)
cmpl $0x0, %eax
jne 0x2f8a3
jmp 0x2f9a1
jmp 0x2f8cb
movq -0x40(%rbp), %rdi
movl $0x2c, %esi
callq 0x2c380
cmpl $0x0, %eax
je 0x2f8c9
cmpl $0x0, -0x44(%rbp)
jne 0x2f8c9
cmpl $0x0, -0x14(%rbp)
jne 0x2f8c9
jmp 0x2f9a1
jmp 0x2f8cb
jmp 0x2f8cd
movq -0x20(%rbp), %rax
movq (%rax), %rax
shrq $0x6, %rax
andq $0x3fff, %rax           # imm = 0x3FFF
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, %ecx
movl %ecx, %edx
movq (%rax), %rcx
andq $0x3fff, %rdx           # imm = 0x3FFF
shlq $0x6, %rdx
andq $-0xfffc1, %rcx         # imm = 0xFFF0003F
orq %rdx, %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
shrq $0x20, %rax
andq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, %ecx
movl %ecx, %edx
movq (%rax), %rcx
andq $0x7fffffff, %rdx       # imm = 0x7FFFFFFF
shlq $0x20, %rdx
movabsq $-0x7fffffff00000001, %rsi # imm = 0x80000000FFFFFFFF
andq %rsi, %rcx
orq %rdx, %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
shrq $0x16, %rax
andq $0x3ff, %rax            # imm = 0x3FF
movl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, %ecx
movl %ecx, %edx
movq (%rax), %rcx
andq $0x3ff, %rdx            # imm = 0x3FF
shlq $0x16, %rdx
movabsq $-0xffc00001, %rsi      # imm = 0xFFFFFFFF003FFFFF
andq %rsi, %rcx
orq %rdx, %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq (%rax), %rcx
andq $-0x100001, %rcx        # imm = 0xFFEFFFFF
orq $0x0, %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
jmp 0x2f763
movq -0x38(%rbp), %rax
leaq 0x7d014(%rip), %rcx     # 0xac9c0
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)