// File: /workspace/github_c_makefile_star2_O3/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 0x4c211(%rip), %rax     # 0x6dfa8
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 0x64825(%rip), %rbp     # 0x865e0
movq %r15, %r13
addq $0x8, %r13
movq (%r13), %r15
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x1a, %eax
jne 0x21dec
movq 0x10(%r15), %rax
andb $-0x2, 0x11(%rax)
movq 0x8(%r15), %r15
movl (%r15), %eax
andl $0x3f, %eax
cmpl $0x1a, %eax
je 0x21dd1
movq %r15, (%r13)
cmpq %rbp, %r15
je 0x21ef6
movq (%r15), %rax
movl %eax, %ecx
andl $0x10003f, %ecx         # imm = 0x10003F
cmpl $0x100012, %ecx         # imm = 0x100012
jne 0x21e21
testq %rax, %rax
js 0x21e21
cmpl $0x23, 0x10(%r15)
jne 0x21e21
movq %r12, %rdi
movq %r13, %rsi
callq 0x21f0c
jmp 0x21e5a
andl $0x3f, %eax
leal -0x10(%rax), %ecx
cmpl $0x2, %ecx
jae 0x21e3d
cmpl $0x2, %ebx
jl 0x21e49
movq 0x10(%r15), %rax
orl $0x80000000, (%rax)     # imm = 0x80000000
jmp 0x21e49
addl $-0x13, %eax
cmpl $0x2, %eax
jb 0x21ef6
cmpl $0x0, 0x47314(%rip)     # 0x69164
je 0x21e67
movq 0x8(%r15), %rax
movq %rax, (%r13)
movq %r15, %rdi
callq 0x2f875
jmp 0x21dc2
movq (%r15), %rax
movl %eax, %ecx
andl $0x3f, %ecx
cmpl $0x12, %ecx
jne 0x21e9d
movl 0x10(%r15), %ecx
cmpl $0x29, %ecx
je 0x21e87
cmpl $0x28, %ecx
jne 0x21e8f
incl (%rsp)
jmp 0x21e9d
subl $0x1, (%rsp)
jae 0x21e9d
jmp 0x21ef6
cmpl $0x2c, %ecx
jne 0x21e9d
movl (%rsp), %ecx
orl 0x4(%rsp), %ecx
je 0x21ef6
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 0x21dbb
movq %rbp, (%r13)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq