// File: /workspace/github_c_makefile_star2_O3/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 0x1120
leaq 0x4b6c(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
leaq 0x4352(%rip), %rax      # 0x5670
movl $0x1, (%rax)
movl $0xffffffff, 0xc(%rsp)  # imm = 0xFFFFFFFF
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 %r14b
andb %dl, %r14b
cmpl %edi, %esi
setl %bl
orb %cl, %bl
testl %eax, %eax
setne %cl
movq %r15, %rax
movl %edi, 0x4(%rsp)
testl %edi, %edi
sete %bpl
andb %cl, %bpl
movq %rax, %r15
movq (%r13), %rdi
callq 0x11d0
movl %eax, %r12d
cmpl $0x2f, %eax
jne 0x13a1
movq (%r13), %rdi
callq 0x11d0
cmpl $0x2a, %eax
jne 0x141b
callq 0x1a77
jmp 0x1377
cmpl $0x3a, %r12d
jg 0x13d0
leal -0x22(%r12), %eax
cmpl $0x6, %eax
leaq 0x10(%rsp), %rdx
ja 0x13f1
leaq 0x1c47(%rip), %rcx      # 0x3004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpq %rdx, %r15
jne 0x142b
jmp 0x15ce
cmpl $0x3b, %r12d
leaq 0x10(%rsp), %rdx
je 0x1411
cmpl $0x7d, %r12d
je 0x1511
cmpl $0x7b, %r12d
je 0x1524
jmp 0x142b
cmpl $-0x1, %r12d
je 0x19f3
cmpl $0xa, %r12d
je 0x152c
jmp 0x142b
testb %bpl, %bpl
je 0x142b
jmp 0x1621
testb %r14b, %r14b
je 0x142b
jmp 0x19bf
movq (%r13), %rsi
movl %eax, %edi
callq 0x1150
leaq 0x10(%rsp), %rdx
movl %r12d, %eax
leaq 0x3e3b(%rip), %rcx      # 0x5270
cmpb $0x0, (%rcx,%rax)
je 0x145d
cmpq %rdx, %r15
jne 0x14fd
leaq 0x3d25(%rip), %rcx      # 0x5170
cmpb $0x0, (%rcx,%rax)
movq %rdx, %rax
je 0x1374
jmp 0x14fd
cmpq %rdx, %r15
je 0x157a
movb $0x0, (%r15)
leaq 0x3ca7(%rip), %rax      # 0x5118
cmpl $0x0, (%rax)
movq %rdx, %rax
je 0x1374
cmpl $0x0, 0x8(%rsp)
jne 0x1499
movabsq $0x66656465707974, %rax # imm = 0x66656465707974
cmpq %rax, 0x10(%rsp)
je 0x15b9
movq %rdx, %rax
testb %bl, %bl
je 0x1374
movl 0x10(%rsp), %eax
movl $0x75727473, %ecx       # imm = 0x75727473
xorl %ecx, %eax
movl 0x13(%rsp), %ecx
movl $0x746375, %esi         # imm = 0x746375
xorl %esi, %ecx
orl %eax, %ecx
je 0x1583
movl 0x10(%rsp), %eax
movl $0x6f696e75, %ecx       # imm = 0x6F696E75
xorl %ecx, %eax
movzwl 0x14(%rsp), %ecx
xorl $0x6e, %ecx
orl %eax, %ecx
je 0x1583
movl 0x10(%rsp), %eax
movl $0x6d756e65, %ecx       # imm = 0x6D756E65
xorl %ecx, %eax
movzbl 0x14(%rsp), %ecx
orl %eax, %ecx
movq %rdx, %rax
jne 0x1374
jmp 0x1583
movb %r12b, (%r15)
incq %r15
movb $0x1, %cl
movq %r15, %rax
movl 0x4(%rsp), %edi
jmp 0x136b
movl 0x4(%rsp), %edi
cmpl $0x2, %edi
movl $0x1, %eax
cmovll %eax, %edi
decl %edi
jmp 0x1551
movl 0x4(%rsp), %edi
incl %edi
jmp 0x1551
leaq 0x413d(%rip), %rax      # 0x5670
incl (%rax)
movq (%r13), %rdi
callq 0x1120
leaq 0x10(%rsp), %rdx
leaq 0x4936(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
movl 0x4(%rsp), %edi
movl $0x0, %eax
cmpq %rdx, %r15
jbe 0x1340
movb $0x0, (%r15)
movl $0x1, %eax
jmp 0x133d
movl %r12d, %edi
callq 0x1a05
leaq 0x10(%rsp), %rdx
movl 0x4(%rsp), %edi
jmp 0x133b
callq 0x26fc
leaq 0x40e1(%rip), %rax      # 0x5670
movl (%rax), %ebp
leaq 0x3ed8(%rip), %r14      # 0x5470
movl %r12d, %eax
cmpb $0x0, (%r14,%rax)
je 0x16c7
movq (%r13), %rdi
callq 0x11d0
movl %eax, %r12d
cmpl $-0x1, %eax
jne 0x1598
jmp 0x1575
movl $0x1, 0x8(%rsp)
movl 0x4(%rsp), %edi
movl %edi, 0xc(%rsp)
jmp 0x133b
leaq 0x409b(%rip), %rax      # 0x5670
movl (%rax), %ebp
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
leaq 0x3e86(%rip), %r14      # 0x5470
je 0x1575
movl %eax, %r12d
leaq 0x110(%rsp), %rbx
movl %r12d, %eax
cmpb $0x0, (%r14,%rax)
jne 0x1735
movb %r12b, (%rbx)
incq %rbx
movq (%r13), %rdi
callq 0x11d0
movl %eax, %r12d
cmpl $-0x1, %eax
jne 0x15f7
jmp 0x1575
cmpq %rdx, %r15
je 0x162a
movb $0x0, (%r15)
callq 0x26fc
leaq 0x403a(%rip), %rax      # 0x5670
movl (%rax), %ebp
xorl %ebx, %ebx
leaq 0x3e2f(%rip), %r14      # 0x5470
leaq 0x19d8(%rip), %r15      # 0x3020
movq (%r13), %rdi
callq 0x11d0
cmpl $0x26, %eax
jle 0x167c
leal -0x27(%rax), %ecx
cmpl $0x8, %ecx
ja 0x1648
movslq (%r15,%rcx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
movq (%r13), %rdi
callq 0x11d0
cmpl $0x2a, %eax
jne 0x1648
callq 0x1a77
jmp 0x1648
cmpl $0xa, %eax
je 0x168f
cmpl $0x22, %eax
jne 0x16ad
movl %eax, %edi
callq 0x1a05
jmp 0x1648
leaq 0x3fda(%rip), %rax      # 0x5670
incl (%rax)
movq (%r13), %rdi
callq 0x1120
leaq 0x47d8(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
jmp 0x1648
cmpl $-0x1, %eax
jne 0x1648
jmp 0x1986
incl %ebx
jmp 0x1648
testl %ebx, %ebx
je 0x18ae
decl %ebx
jmp 0x1648
cmpl $0x7b, %r12d
jne 0x16dd
movl 0x4(%rsp), %edi
incl %edi
leaq 0x10(%rsp), %rdx
jmp 0x133b
leaq 0x110(%rsp), %rbx
movb %r12b, (%rbx)
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1575
movl %eax, %r12d
incq %rbx
movl %eax, %eax
leaq 0x3b67(%rip), %rcx      # 0x5270
cmpb $0x0, (%rcx,%rax)
jne 0x16e5
cmpl $0xa, %r12d
je 0x1815
cmpl $0x2f, %r12d
je 0x183f
cmpl $0x7b, %r12d
jne 0x1852
decq %rbx
jmp 0x186e
movb $0x0, (%rbx)
movl 0x110(%rsp), %eax
movl $0x69666564, %ecx       # imm = 0x69666564
xorl %ecx, %eax
movzwl 0x114(%rsp), %ecx
xorl $0x656e, %ecx           # imm = 0x656E
orl %eax, %ecx
je 0x1793
cmpl $0xa, %r12d
jne 0x1784
leaq 0x3f0b(%rip), %rax      # 0x5670
incl (%rax)
movq (%r13), %rdi
callq 0x1120
leaq 0x4709(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
cmpb $0x5c, -0x1(%rbx)
jne 0x1575
movl $0xa, %edi
callq 0x1ae3
jmp 0x1575
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1575
movl %eax, %r12d
movl %eax, %eax
cmpb $0x0, (%r14,%rax)
jne 0x1793
leaq 0x110(%rsp), %rbx
movb %r12b, (%rbx)
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1575
movl %eax, %r12d
incq %rbx
movl %eax, %eax
leaq 0x3a93(%rip), %rcx      # 0x5270
cmpb $0x0, (%rcx,%rax)
jne 0x17b9
movb $0x0, (%rbx)
cmpl $0x28, %r12d
je 0x17fc
leaq 0x394d(%rip), %rax      # 0x5140
cmpl $0x0, (%rax)
je 0x1758
callq 0x26fc
leaq 0x110(%rsp), %rdi
movl %ebp, %esi
callq 0x28dc
jmp 0x1758
leaq 0x3e54(%rip), %rax      # 0x5670
incl (%rax)
movq (%r13), %rdi
callq 0x1120
leaq 0x4652(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
movq (%r13), %rdi
callq 0x11d0
cmpl $0x2f, %eax
jne 0x1885
movq (%r13), %rdi
callq 0x11d0
cmpl $0x2a, %eax
jne 0x1852
callq 0x1a77
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x189e
movl %eax, %ecx
cmpb $0x0, (%r14,%rcx)
jne 0x1852
cmpl $0x7b, %eax
jne 0x189e
movb $0x0, (%rbx)
leaq 0x110(%rsp), %rdi
movl %ebp, %esi
callq 0x28dc
jmp 0x16cd
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x189e
movl %eax, %ecx
cmpb $0x0, (%r14,%rcx)
jne 0x1885
jmp 0x1869
movq (%r13), %rsi
movl %eax, %edi
callq 0x1150
jmp 0x1575
movq (%r13), %rdi
callq 0x11d0
cmpl $-0x1, %eax
je 0x1986
movl %eax, %r12d
leaq 0x110(%rsp), %rbx
movl %r12d, %ecx
cmpb $0x0, (%r14,%rcx)
je 0x18f9
cmpl $0xa, %r12d
jne 0x1930
leaq 0x3d8e(%rip), %rax      # 0x5670
incl (%rax)
movq (%r13), %rdi
callq 0x1120
leaq 0x458c(%rip), %rcx      # 0x5e80
movq %rax, (%rcx)
jmp 0x1930
movq %rbx, %rax
leaq 0x396d(%rip), %rdx      # 0x5270
movb (%rdx,%rcx), %cl
leaq 0x110(%rsp), %rdx
subq %rdx, %rax
jne 0x1943
testb %cl, %cl
jne 0x194d
cmpl $0x2f, %r12d
jne 0x1955
movq (%r13), %rdi
callq 0x11d0
cmpl $0x2a, %eax
jne 0x1977
callq 0x1a77
movq (%r13), %rdi
callq 0x11d0
movl %eax, %r12d
cmpl $-0x1, %eax
jne 0x18cb
jmp 0x1986
testb %cl, %cl
je 0x1992
cmpq $0xd, %rax
jge 0x19ad
movb %r12b, (%rbx)
incq %rbx
jmp 0x1930
cmpl $0x7b, %r12d
jne 0x197a
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x28dc
movq %rbx, %rdx
movl $0x1, %edi
jmp 0x133b
movl %eax, %r12d
movq (%r13), %rsi
movl %r12d, %edi
callq 0x1150
xorl %edi, %edi
leaq 0x10(%rsp), %rdx
jmp 0x133b
movb $0x0, (%rbx)
leaq 0x110(%rsp), %rdi
leaq 0x3764(%rip), %rsi      # 0x5108
callq 0x1100
testl %eax, %eax
je 0x197a
cmpl $0x7b, %r12d
je 0x195b
movl $0x7b, %edi
callq 0x1ae3
jmp 0x195b
callq 0x26fc
leaq 0x10(%rsp), %rax
cmpq %rax, %r15
je 0x19d2
movb $0x0, (%r15)
leaq 0x3c97(%rip), %rax      # 0x5670
movl (%rax), %esi
leaq 0x10(%rsp), %rdi
callq 0x28dc
leaq 0x10(%rsp), %rdx
movl 0xc(%rsp), %edi
jmp 0x1333
addq $0x918, %rsp            # imm = 0x918
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq