// File: /workspace/github_c_makefile_star2_O2/darwin-on-arm[P]darwin-sdk/developer_cmds/ctags/C.c
// Function: c_entries
void
c_entries()
{
	int	c;			/* current character */
	int	level;			/* brace level */
	int	token;			/* if reading a token */
	int	t_def;			/* if reading a typedef */
	int	t_level;		/* typedef's brace level */
	char	*sp;			/* buffer pointer */
	char	tok[MAXTOKEN];		/* token buffer */

	lineftell = ftell(inf);
	sp = tok; token = t_def = NO; t_level = -1; level = 0; lineno = 1;
	while (GETC(!=, EOF)) {
		switch (c) {
		/*
		 * Here's where it DOESN'T handle: {
		 *	foo(a)
		 *	{
		 *	#ifdef notdef
		 *		}
		 *	#endif
		 *		if (a)
		 *			puts("hello, world");
		 *	}
		 */
		case '{':
			++level;
			goto endtok;
		case '}':
			/*
			 * if level goes below zero, try and fix
			 * it, even though we've already messed up
			 */
			if (--level < 0)
				level = 0;
			goto endtok;

		case '\n':
			SETLINE;
			/*
			 * the above 3 cases are similar in that they
			 * are special characters that also end tokens.
			 */
	endtok:			if (sp > tok) {
				*sp = EOS;
				token = YES;
				sp = tok;
			}
			else
				token = NO;
			continue;

		/*
		 * We ignore quoted strings and character constants
		 * completely.
		 */
		case '"':
		case '\'':
			(void)skip_string(c);
			break;

		/*
		 * comments can be fun; note the state is unchanged after
		 * return, in case we found:
		 *	"foo() XX comment XX { int bar; }"
		 */
		case '/':
			if (GETC(==, '*')) {
				skip_comment();
				continue;
			}
			(void)ungetc(c, inf);
			c = '/';
			goto storec;

		/* hash marks flag #define's. */
		case '#':
			if (sp == tok) {
				hash_entry();
				break;
			}
			goto storec;

		/*
		 * if we have a current token, parenthesis on
		 * level zero indicates a function.
		 */
		case '(':
			if (!level && token) {
				int	curline;

				if (sp != tok)
					*sp = EOS;
				/*
				 * grab the line immediately, we may
				 * already be wrong, for example,
				 *	foo\n
				 *	(arg1,
				 */
				ct_getline();
				curline = lineno;
				if (func_entry()) {
					++level;
					pfnote(tok, curline);
				}
				break;
			}
			goto storec;

		/*
		 * semi-colons indicate the end of a typedef; if we find a
		 * typedef we search for the next semi-colon of the same
		 * level as the typedef.  Ignoring "structs", they are
		 * tricky, since you can find:
		 *
		 *	"typedef long time_t;"
		 *	"typedef unsigned int u_int;"
		 *	"typedef unsigned int u_int [10];"
		 *
		 * If looking at a typedef, we save a copy of the last token
		 * found.  Then, when we find the ';' we take the current
		 * token if it starts with a valid token name, else we take
		 * the one we saved.  There's probably some reasonable
		 * alternative to this...
		 */
		case ';':
			if (t_def && level == t_level) {
				t_def = NO;
				ct_getline();
				if (sp != tok)
					*sp = EOS;
				pfnote(tok, lineno);
				break;
			}
			goto storec;

		/*
		 * store characters until one that can't be part of a token
		 * comes along; check the current token against certain
		 * reserved words.
		 */
		default:
	storec:		if (!intoken(c)) {
				if (sp == tok)
					break;
				*sp = EOS;
				if (tflag) {
					/* no typedefs inside typedefs */
					if (!t_def &&
						   !memcmp(tok, "typedef",8)) {
						t_def = YES;
						t_level = level;
						break;
					}
					/* catch "typedef struct" */
					if ((!t_def || t_level < level)
					    && (!memcmp(tok, "struct", 7)
					    || !memcmp(tok, "union", 6)
					    || !memcmp(tok, "enum", 5))) {
						/*
						 * get line immediately;
						 * may change before '{'
						 */
						ct_getline();
						if (str_entry(c))
							++level;
						break;
						/* } */
					}
				}
				sp = tok;
			}
			else if (sp != tok || begtoken(c)) {
				*sp++ = c;
				token = YES;
			}
			continue;
		}

		sp = tok;
		token = NO;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x918, %rsp            # imm = 0x918
leaq 0x3e4c(%rip), %r13      # 0x5150
movq (%r13), %rdi
callq 0x1110
leaq 0x4b6c(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
leaq 0x4352(%rip), %rax      # 0x5670
movl $0x1, (%rax)
pushq $-0x1
popq %rax
movl %eax, 0xc(%rsp)
xorl %edi, %edi
leaq 0x10(%rsp), %rdx
movl $0x0, 0x8(%rsp)
xorl %eax, %eax
movq %rdx, %r15
cmpl $0x0, 0x8(%rsp)
sete %cl
setne %dl
movl 0xc(%rsp), %esi
cmpl %esi, %edi
sete %bpl
andb %dl, %bpl
cmpl %edi, %esi
setl %bl
orb %cl, %bl
testl %eax, %eax
setne %al
movq %r15, %rcx
movl %edi, 0x4(%rsp)
testl %edi, %edi
sete %r14b
andb %al, %r14b
movq %rcx, %r15
movq (%r13), %rdi
callq 0x11d0
movl %eax, %r12d
cmpl $0x2f, %eax
jne 0x139c
movq (%r13), %rdi
callq 0x11d0
cmpl $0x2a, %eax
jne 0x13ff
callq 0x1a26
jmp 0x1376
leal -0x22(%r12), %eax
cmpl $0x6, %eax
leaq 0x10(%rsp), %rdx
jbe 0x13db
cmpl $-0x1, %r12d
je 0x19a2
cmpl $0xa, %r12d
je 0x1505
cmpl $0x3b, %r12d
je 0x1411
cmpl $0x7d, %r12d
je 0x152c
cmpl $0x7b, %r12d
je 0x153d
jmp 0x141a
leaq 0x1c22(%rip), %rcx      # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq %rdx, %r15
jne 0x141a
jmp 0x165e
testb %r14b, %r14b
je 0x141a
jmp 0x15bd
movq (%r13), %rsi
movl %eax, %edi
callq 0x1140
leaq 0x10(%rsp), %rdx
jmp 0x141a
testb %bpl, %bpl
jne 0x196e
movl %r12d, %eax
leaq 0x3e4c(%rip), %rcx      # 0x5270
cmpb $0x0, (%rcx,%rax)
je 0x144c
cmpq %rdx, %r15
jne 0x14f1
leaq 0x3d36(%rip), %rcx      # 0x5170
cmpb $0x0, (%rcx,%rax)
movq %rdx, %rcx
je 0x1373
jmp 0x14f1
cmpq %rdx, %r15
je 0x156a
movb $0x0, (%r15)
leaq 0x3cb8(%rip), %rax      # 0x5118
cmpl $0x0, (%rax)
movq %rdx, %rcx
je 0x1373
cmpl $0x0, 0x8(%rsp)
jne 0x1488
movabsq $0x66656465707974, %rax # imm = 0x66656465707974
cmpq %rax, 0x10(%rsp)
je 0x15a9
movq %rdx, %rcx
testb %bl, %bl
je 0x1373
leaq 0x10(%rsp), %rdi
leaq 0x1ba5(%rip), %rsi      # 0x3044
pushq $0x7
popq %rdx
callq 0x1150
testl %eax, %eax
je 0x1573
leaq 0x10(%rsp), %rdi
leaq 0x1b90(%rip), %rsi      # 0x304b
pushq $0x6
popq %rdx
callq 0x1150
testl %eax, %eax
je 0x1573
leaq 0x10(%rsp), %rdi
leaq 0x1b7a(%rip), %rsi      # 0x3051
pushq $0x5
popq %rdx
callq 0x1150
leaq 0x10(%rsp), %rcx
testl %eax, %eax
jne 0x1373
jmp 0x1573
movb %r12b, (%r15)
incq %r15
movb $0x1, %al
movq %r15, %rcx
movl 0x4(%rsp), %edi
jmp 0x136a
leaq 0x4164(%rip), %rax      # 0x5670
incl (%rax)
movq (%r13), %rdi
callq 0x1110
leaq 0x10(%rsp), %rdx
leaq 0x495d(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
movl 0x4(%rsp), %edi
jmp 0x1543
movl 0x4(%rsp), %edi
cmpl $0x2, %edi
pushq $0x1
popq %rax
cmovll %eax, %edi
decl %edi
jmp 0x1543
movl 0x4(%rsp), %edi
incl %edi
movl $0x0, %eax
cmpq %rdx, %r15
jbe 0x133f
movb $0x0, (%r15)
pushq $0x1
popq %rax
jmp 0x133c
movl %r12d, %edi
callq 0x19b4
leaq 0x10(%rsp), %rdx
movl 0x4(%rsp), %edi
jmp 0x133a
callq 0x242c
leaq 0x40f1(%rip), %rax      # 0x5670
movl (%rax), %ebp
leaq 0x3ee8(%rip), %r14      # 0x5470
movl %r12d, %eax
cmpb $0x0, (%r14,%rax)
je 0x169c
movq (%r13), %rdi
callq 0x11d0
movl %eax, %r12d
cmpl $-0x1, %eax
jne 0x1588
jmp 0x1565
pushq $0x1
popq %rax
movl %eax, 0x8(%rsp)
movl 0x4(%rsp), %edi
movl %edi, 0xc(%rsp)
jmp 0x133a
cmpq %rdx, %r15
je 0x15c6
movb $0x0, (%r15)
callq 0x242c
leaq 0x409e(%rip), %rax      # 0x5670
movl (%rax), %ebp
xorl %ebx, %ebx
leaq 0x3e93(%rip), %r14      # 0x5470
leaq 0x1a3c(%rip), %r15      # 0x3020
movq (%r13), %rdi
callq 0x11d0
leal -0x27(%rax), %ecx
cmpl $0x8, %ecx
ja 0x1613
movslq (%r15,%rcx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
movq (%r13), %rdi
callq 0x11d0
cmpl $0x2a, %eax
jne 0x15e4
callq 0x1a26
jmp 0x15e4
cmpl $0xa, %eax
je 0x1630
cmpl $0x22, %eax
je 0x1627
cmpl $-0x1, %eax
jne 0x15e4
jmp 0x1937
movl %eax, %edi
callq 0x19b4
jmp 0x15e4
leaq 0x4039(%rip), %rax      # 0x5670
incl (%rax)
movq (%r13), %rdi
callq 0x1110
leaq 0x4837(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
jmp 0x15e4
testl %ebx, %ebx
je 0x1871
decl %ebx
jmp 0x15e4
incl %ebx
jmp 0x15e4
leaq 0x400b(%rip), %rax      # 0x5670
movl (%rax), %ebp
leaq 0x110(%rsp), %rbx
leaq 0x3dfa(%rip), %r14      # 0x5470
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1565
movl %eax, %r12d
movl %eax, %eax
cmpb $0x0, (%r14,%rax)
jne 0x16b6
movb %r12b, (%rbx)
incq %rbx
jmp 0x1676
cmpl $0x7b, %r12d
jne 0x178f
movl 0x4(%rsp), %edi
incl %edi
leaq 0x10(%rsp), %rdx
jmp 0x133a
movb $0x0, (%rbx)
leaq 0x110(%rsp), %rdi
leaq 0x198e(%rip), %rsi      # 0x3056
pushq $0x6
popq %rdx
callq 0x1150
testl %eax, %eax
je 0x170d
cmpl $0xa, %r12d
jne 0x1700
leaq 0x3f8f(%rip), %rax      # 0x5670
incl (%rax)
movq (%r13), %rdi
callq 0x1110
leaq 0x478d(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
cmpb $0x5c, -0x1(%rbx)
jne 0x1565
pushq $0xa
popq %rdi
callq 0x1a8b
jmp 0x1565
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1565
movl %eax, %r12d
movl %eax, %eax
cmpb $0x0, (%r14,%rax)
jne 0x170d
leaq 0x110(%rsp), %rbx
movb %r12b, (%rbx)
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1565
movl %eax, %r12d
incq %rbx
movl %eax, %eax
leaq 0x3b19(%rip), %rcx      # 0x5270
cmpb $0x0, (%rcx,%rax)
jne 0x1733
movb $0x0, (%rbx)
cmpl $0x28, %r12d
je 0x1776
leaq 0x39d3(%rip), %rax      # 0x5140
cmpl $0x0, (%rax)
je 0x16d4
callq 0x242c
leaq 0x110(%rsp), %rdi
movl %ebp, %esi
callq 0x25d8
jmp 0x16d4
leaq 0x110(%rsp), %rbx
movb %r12b, (%rbx)
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1565
movl %eax, %r12d
incq %rbx
movl %eax, %eax
leaq 0x3ab5(%rip), %rcx      # 0x5270
cmpb $0x0, (%rcx,%rax)
jne 0x1797
cmpl $0xa, %r12d
je 0x17d8
cmpl $0x2f, %r12d
je 0x1802
cmpl $0x7b, %r12d
jne 0x1815
decq %rbx
jmp 0x1831
leaq 0x3e91(%rip), %rax      # 0x5670
incl (%rax)
movq (%r13), %rdi
callq 0x1110
leaq 0x468f(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
movq (%r13), %rdi
callq 0x11d0
cmpl $0x2f, %eax
jne 0x1848
movq (%r13), %rdi
callq 0x11d0
cmpl $0x2a, %eax
jne 0x1815
callq 0x1a26
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1861
movl %eax, %ecx
cmpb $0x0, (%r14,%rcx)
jne 0x1815
cmpl $0x7b, %eax
jne 0x1861
movb $0x0, (%rbx)
leaq 0x110(%rsp), %rdi
movl %ebp, %esi
callq 0x25d8
jmp 0x16a6
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1861
movl %eax, %ecx
cmpb $0x0, (%r14,%rcx)
jne 0x1848
jmp 0x182c
movq (%r13), %rsi
movl %eax, %edi
callq 0x1140
jmp 0x1565
leaq 0x110(%rsp), %rbx
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1937
movl %eax, %r12d
movl %eax, %ecx
cmpb $0x0, (%r14,%rcx)
je 0x18bb
cmpl $0xa, %r12d
jne 0x1879
leaq 0x3dcc(%rip), %rax      # 0x5670
incl (%rax)
movq (%r13), %rdi
callq 0x1110
leaq 0x45ca(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
jmp 0x1879
movq %rbx, %rax
leaq 0x39ab(%rip), %rdx      # 0x5270
movb (%rdx,%rcx), %cl
leaq 0x110(%rsp), %rdx
subq %rdx, %rax
jne 0x18f4
testb %cl, %cl
jne 0x18fe
cmpl $0x2f, %r12d
jne 0x1909
movq (%r13), %rdi
callq 0x11d0
cmpl $0x2a, %eax
jne 0x1928
callq 0x1a26
jmp 0x1879
testb %cl, %cl
je 0x1943
cmpq $0xd, %rax
jge 0x195e
movb %r12b, (%rbx)
incq %rbx
jmp 0x1879
cmpl $0x7b, %r12d
jne 0x192b
leaq 0x10(%rsp), %rdi
movl %ebp, %esi
callq 0x25d8
leaq 0x10(%rsp), %rdx
pushq $0x1
popq %rdi
jmp 0x133a
movl %eax, %r12d
movq (%r13), %rsi
movl %r12d, %edi
callq 0x1140
xorl %edi, %edi
leaq 0x10(%rsp), %rdx
jmp 0x133a
movb $0x0, (%rbx)
leaq 0x110(%rsp), %rdi
leaq 0x37b3(%rip), %rsi      # 0x5108
callq 0x10f0
testl %eax, %eax
je 0x192b
cmpl $0x7b, %r12d
je 0x190f
pushq $0x7b
popq %rdi
callq 0x1a8b
jmp 0x190f
callq 0x242c
leaq 0x10(%rsp), %rax
cmpq %rax, %r15
je 0x1981
movb $0x0, (%r15)
leaq 0x3ce8(%rip), %rax      # 0x5670
movl (%rax), %esi
leaq 0x10(%rsp), %rdi
callq 0x25d8
leaq 0x10(%rsp), %rdx
movl 0xc(%rsp), %edi
jmp 0x1332
addq $0x918, %rsp            # imm = 0x918
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq