// File: /workspace/github_c_makefile_star2_O2/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, %r12
leaq 0x48e54(%rip), %rax     # 0x67fa8
movl (%rdi), %ecx
shrl $0x6, %ecx
andl $0x3fff, %ecx           # imm = 0x3FFF
imulq $0x50, %rcx, %r15
addq (%rax), %r15
movl $0x0, (%rsp)
leaq 0x6146c(%rip), %rbp     # 0x805e0
movq %r12, %r13
addq $0x8, %r13
movq %r13, %rdi
callq 0x1e5fe
movq %rax, %r12
cmpq %rbp, %rax
je 0x1f299
movq (%r12), %rax
movl %eax, %ecx
andl $0x10003f, %ecx         # imm = 0x10003F
cmpl $0x100012, %ecx         # imm = 0x100012
jne 0x1f1bd
testq %rax, %rax
js 0x1f1bd
cmpl $0x23, 0x10(%r12)
jne 0x1f1bd
movq %r15, %rdi
movq %r13, %rsi
callq 0x1f2af
jmp 0x1f1f8
andl $0x3f, %eax
leal -0x10(%rax), %ecx
cmpl $0x2, %ecx
jae 0x1f1da
cmpl $0x2, %ebx
jl 0x1f1e6
movq 0x10(%r12), %rax
orl $0x80000000, (%rax)     # imm = 0x80000000
jmp 0x1f1e6
addl $-0x13, %eax
cmpl $0x2, %eax
jb 0x1f299
cmpl $0x0, 0x43f77(%rip)     # 0x63164
je 0x1f205
movq 0x8(%r12), %rax
movq %rax, (%r13)
movq %r12, %rdi
callq 0x2a956
jmp 0x1f17b
movq (%r12), %rax
movl %eax, %ecx
andl $0x3f, %ecx
cmpl $0x12, %ecx
jne 0x1f23d
movl 0x10(%r12), %ecx
cmpl $0x29, %ecx
je 0x1f227
cmpl $0x28, %ecx
jne 0x1f22f
incl (%rsp)
jmp 0x1f23d
subl $0x1, (%rsp)
jae 0x1f23d
jmp 0x1f299
cmpl $0x2c, %ecx
jne 0x1f23d
movl (%rsp), %ecx
orl 0x4(%rsp), %ecx
je 0x1f299
movq (%r14), %rcx
andl $0xfffc0, %ecx          # imm = 0xFFFC0
andq $-0xfffc1, %rax         # imm = 0xFFF0003F
orq %rcx, %rax
movq %rax, (%r12)
movq (%r14), %rcx
movabsq $0x7fffffff00000000, %rdx # imm = 0x7FFFFFFF00000000
andq %rdx, %rcx
movabsq $-0x7fffffff00000001, %rdx # imm = 0x80000000FFFFFFFF
andq %rdx, %rax
orq %rcx, %rax
movq %rax, (%r12)
movq (%r14), %rcx
andl $0xffc00000, %ecx       # imm = 0xFFC00000
movabsq $-0xffd00001, %rdx      # imm = 0xFFFFFFFF002FFFFF
andq %rdx, %rax
orq %rcx, %rax
movq %rax, (%r12)
jmp 0x1f174
movq %rbp, (%r13)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq