// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r14
movl %esi, 0x4(%rsp)
movq %rdi, %r15
leaq 0x4d1b1(%rip), %rax     # 0x6efa8
movl (%rdi), %ecx
shrl $0x6, %ecx
andl $0x3fff, %ecx           # imm = 0x3FFF
leaq (%rcx,%rcx,4), %r12
shll $0x4, %r12d
addq (%rax), %r12
movl $0x0, (%rsp)
leaq 0x657c5(%rip), %rbp     # 0x875e0
movq %r15, %r13
addq $0x8, %r13
movq (%r13), %r15
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x1a, %eax
jne 0x21e4c
movq 0x10(%r15), %rax
andb $-0x2, 0x11(%rax)
movq 0x8(%r15), %r15
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x1a, %eax
je 0x21e31
movq %r15, (%r13)
cmpq %rbp, %r15
je 0x21f73
movq (%r15), %rax
btl $0x14, %eax
jb 0x21e7a
andl $0x3f, %eax
leal -0x10(%rax), %ecx
cmpl $0x2, %ecx
jae 0x21e8e
cmpl $0x2, %ebx
jl 0x21e9a
movq 0x10(%r15), %rax
orl $0x80000000, (%rax)     # imm = 0x80000000
jmp 0x21e9a
movl %eax, %ecx
andl $0x3f, %ecx
cmpl $0x12, %ecx
jne 0x21ead
cmpl $0x23, 0x10(%r15)
sete %cl
jmp 0x21eaf
addl $-0x13, %eax
cmpl $0x2, %eax
jb 0x21f73
cmpl $0x0, 0x482c3(%rip)     # 0x6a164
je 0x21ed0
movq 0x8(%r15), %rax
movq %rax, (%r13)
jmp 0x21ec3
xorl %ecx, %ecx
testq %rax, %rax
js 0x21e5e
testb %cl, %cl
je 0x21e5e
movq %r12, %rdi
movq %r13, %rsi
callq 0x21f89
movq %r15, %rdi
callq 0x2fea9
jmp 0x21e22
movq (%r15), %rax
movl %eax, %edx
andl $0x3f, %edx
movb $0x1, %cl
cmpq $0x12, %rdx
jne 0x21f0d
cmpl $0x28, 0x10(%r15)
jne 0x21eec
incl (%rsp)
jmp 0x21f1a
cmpl $0x12, %edx
jne 0x21f0d
cmpl $0x29, 0x10(%r15)
jne 0x21f00
subl $0x1, (%rsp)
jae 0x21f1a
jmp 0x21f73
cmpl $0x12, %edx
jne 0x21f0d
cmpl $0x2c, 0x10(%r15)
setne %cl
testb %cl, %cl
jne 0x21f1a
movl (%rsp), %ecx
orl 0x4(%rsp), %ecx
je 0x21f73
movq (%r14), %rcx
andl $0xfffc0, %ecx          # imm = 0xFFFC0
andq $-0xfffc1, %rax         # imm = 0xFFF0003F
orq %rcx, %rax
movq %rax, (%r15)
movq (%r14), %rcx
movabsq $0x7fffffff00000000, %rdx # imm = 0x7FFFFFFF00000000
andq %rdx, %rcx
movabsq $-0x7fffffff00000001, %rdx # imm = 0x80000000FFFFFFFF
andq %rdx, %rax
orq %rcx, %rax
movq %rax, (%r15)
movq (%r14), %rcx
andl $0xffc00000, %ecx       # imm = 0xFFC00000
movabsq $-0xffd00001, %rdx      # imm = 0xFFFFFFFF002FFFFF
andq %rdx, %rax
orq %rcx, %rax
movq %rax, (%r15)
jmp 0x21e1b
movq %rbp, (%r13)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq