// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
leaq 0x4e5e(%rip), %rax      # 0x6140
movq (%rax), %rdi
callq 0x1110
movq %rax, %rcx
leaq 0x5b7c(%rip), %rax      # 0x6e70
movq %rcx, (%rax)
leaq -0x120(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x10(%rbp)
movl $0x0, -0xc(%rbp)
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x8(%rbp)
leaq 0x533b(%rip), %rax      # 0x6660
movl $0x1, (%rax)
leaq 0x4e0e(%rip), %rax      # 0x6140
movq (%rax), %rdi
callq 0x11b0
movl %eax, -0x4(%rbp)
cmpl $-0x1, %eax
je 0x16f1
movl -0x4(%rbp), %eax
movl %eax, -0x128(%rbp)
subl $0xa, %eax
je 0x13ff
jmp 0x135a
movl -0x128(%rbp), %eax
subl $0x22, %eax
je 0x1467
jmp 0x136b
movl -0x128(%rbp), %eax
subl $0x23, %eax
je 0x14b3
jmp 0x137c
movl -0x128(%rbp), %eax
subl $0x27, %eax
je 0x1467
jmp 0x138d
movl -0x128(%rbp), %eax
subl $0x28, %eax
je 0x14d2
jmp 0x139e
movl -0x128(%rbp), %eax
subl $0x2f, %eax
je 0x1474
jmp 0x13af
movl -0x128(%rbp), %eax
subl $0x3b, %eax
je 0x1535
jmp 0x13c0
movl -0x128(%rbp), %eax
subl $0x7b, %eax
je 0x13dd
jmp 0x13cd
movl -0x128(%rbp), %eax
subl $0x7d, %eax
je 0x13e8
jmp 0x1582
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x1430
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, %eax
jge 0x13fd
movl $0x0, -0x8(%rbp)
jmp 0x1430
leaq 0x525a(%rip), %rax      # 0x6660
movl (%rax), %ecx
addl $0x1, %ecx
leaq 0x524e(%rip), %rax      # 0x6660
movl %ecx, (%rax)
leaq 0x4d25(%rip), %rax      # 0x6140
movq (%rax), %rdi
callq 0x1110
movq %rax, %rcx
leaq 0x5a43(%rip), %rax      # 0x6e70
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rcx, %rax
jbe 0x145b
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movl $0x1, -0xc(%rbp)
leaq -0x120(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x1462
movl $0x0, -0xc(%rbp)
jmp 0x132b
movl -0x4(%rbp), %edi
callq 0x1700
jmp 0x16da
leaq 0x4cc5(%rip), %rax      # 0x6140
movq (%rax), %rdi
callq 0x11b0
movl %eax, -0x4(%rbp)
cmpl $0x2a, %eax
jne 0x1495
callq 0x17b0
jmp 0x132b
movl -0x4(%rbp), %edi
leaq 0x4ca1(%rip), %rax      # 0x6140
movq (%rax), %rsi
callq 0x1140
movl $0x2f, -0x4(%rbp)
jmp 0x1584
movq -0x20(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rcx, %rax
jne 0x14cd
callq 0x1850
jmp 0x16da
jmp 0x1584
cmpl $0x0, -0x8(%rbp)
jne 0x1533
cmpl $0x0, -0xc(%rbp)
je 0x1533
movq -0x20(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rcx, %rax
je 0x14f5
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
callq 0x3020
leaq 0x515f(%rip), %rax      # 0x6660
movl (%rax), %eax
movl %eax, -0x124(%rbp)
callq 0x1a00
cmpl $0x0, %eax
je 0x152e
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
leaq -0x120(%rbp), %rdi
movl -0x124(%rbp), %esi
callq 0x32f0
jmp 0x16da
jmp 0x1584
cmpl $0x0, -0x10(%rbp)
je 0x1580
movl -0x8(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x1580
movl $0x0, -0x10(%rbp)
callq 0x3020
movq -0x20(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rcx, %rax
je 0x1566
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
leaq -0x120(%rbp), %rdi
leaq 0x50ec(%rip), %rax      # 0x6660
movl (%rax), %esi
callq 0x32f0
jmp 0x16da
jmp 0x1584
jmp 0x1584
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x4cd0(%rip), %rax      # 0x6260
cmpb $0x0, (%rax,%rcx)
jne 0x1691
movq -0x20(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rcx, %rax
jne 0x15af
jmp 0x16da
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
leaq 0x4b4b(%rip), %rax      # 0x6108
cmpl $0x0, (%rax)
je 0x1684
cmpl $0x0, -0x10(%rbp)
jne 0x1600
leaq -0x120(%rbp), %rax
movq (%rax), %rax
movabsq $0x66656465707974, %rcx # imm = 0x66656465707974
subq %rcx, %rax
setne %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1600
movl $0x1, -0x10(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x16da
cmpl $0x0, -0x10(%rbp)
je 0x160e
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x1682
leaq -0x120(%rbp), %rdi
leaq 0x2a88(%rip), %rsi      # 0x40a4
movl $0x7, %edx
callq 0x10d0
cmpl $0x0, %eax
je 0x1665
leaq -0x120(%rbp), %rdi
leaq 0x2a72(%rip), %rsi      # 0x40ab
movl $0x6, %edx
callq 0x10d0
cmpl $0x0, %eax
je 0x1665
leaq -0x120(%rbp), %rdi
leaq 0x2a5b(%rip), %rsi      # 0x40b1
movl $0x5, %edx
callq 0x10d0
cmpl $0x0, %eax
jne 0x1682
callq 0x3020
movl -0x4(%rbp), %edi
callq 0x1cc0
cmpl $0x0, %eax
je 0x1680
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x16da
jmp 0x1684
leaq -0x120(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x16d5
movq -0x20(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rcx, %rax
jne 0x16b6
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x4ab3(%rip), %rax      # 0x6160
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x16d3
movl -0x4(%rbp), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rbp)
movb %cl, (%rax)
movl $0x1, -0xc(%rbp)
jmp 0x16d5
jmp 0x132b
leaq -0x120(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0xc(%rbp)
jmp 0x132b
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopw (%rax,%rax)