// File: /workspace/github_c_makefile_star2_O2/nimble-code[P]gh_cpp/Src/gh_cpp2.c
// Function: do_include
int
do_include(int ln, char *from)
{	FILE *tfd;
	char *p, *q, *s;

	if (misra_rules
	&&  ln == 0	/* check top level source file only */
	&&  sawcode)
		m_rule(19, 1, "#include preceded by code");

	skipwhite();
	sawcode = 0;

	if (*nowc == '"')
	{	nowc++;
		p = strchr(nowc, '"');
		if (!p) fatal_error("syntax error in directive");
		*p = '\0';

		if ((q = strrchr(filename, '/')) != NULL
		&&   strrchr(nowc, '/') == NULL)	/* new 3/24/05 */
		{	/* prepend directory to name in nowc */
			*q = '\0';
			s = (char *) emalloc(strlen(filename)+strlen(nowc)+1+1);
			sprintf(s, "%s/%s", filename, nowc);
			*q = '/';
		} else
			s = next_file(nowc);

		if ((tfd = fopen(s, "r")) != NULL)
		{	fclose(tfd);
			if (verbose>1) printf("/**** #include: %s ****/\n", s);
			do_file(from, lineno, s);
		} else
		{	if (q != NULL)
				s = next_file(nowc); /* revert */
			if (!search_sys(sysdirs, s))
			{	if (!not_printing[level])
				fprintf(stderr, "%s,%d: cannot find include file %s\n",
					filename, lineno, s);
				*p = '"';
				return -1;
		}	}
		*p = '"';
	} else if (*nowc == '<')
	{	nowc++;
		p = strchr(nowc, '>');
		if (!p) fatal_error("syntax error in directive");
		*p = '\0';
		if (!search_sys(sysdirs, nowc))
		{	if (!not_printing[level])
			fprintf(stderr, "%s,%d: cannot find include file %s\n",
				filename, lineno, nowc);
			*p = '>';
			return -1;
		}
		*p = '>';
	} else
		return 0;	/* passed to preprocessor */

	if (stack_depth <= 1 || !main_only)
		printf("# %d \"%s\"\n", lineno, from);
	return 1;		/* not passed to preprocessor */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0xb237(%rip), %r14      # 0x132f0
testl %edi, %edi
jne 0x80e1
leaq 0x9dd0(%rip), %rax      # 0x11e94
cmpl $0x0, (%rax)
je 0x80e1
cmpl $0x0, (%r14)
je 0x80e1
leaq 0x6078(%rip), %rdx      # 0xe14e
pushq $0x13
popq %rdi
pushq $0x1
popq %rsi
callq 0x9bc0
callq 0x4544
andl $0x0, (%r14)
leaq 0x9daf(%rip), %r13      # 0x11ea0
movq (%r13), %rdi
movzbl (%rdi), %eax
cmpl $0x3c, %eax
je 0x816e
xorl %r14d, %r14d
cmpl $0x22, %eax
jne 0x82f4
incq %rdi
movq %rdi, (%r13)
pushq $0x22
popq %rsi
callq 0x40b0
movq %rax, %r14
testq %rax, %rax
jne 0x812c
leaq 0x6041(%rip), %rdi      # 0xe168
callq 0x42ec
movb $0x0, (%r14)
leaq 0x8fd9(%rip), %rax      # 0x11110
movq (%rax), %rdi
pushq $0x2f
popq %rsi
callq 0x40d0
movq %rax, %r12
movq (%r13), %r15
testq %rax, %rax
je 0x815e
pushq $0x2f
popq %rsi
movq %r15, %rdi
callq 0x40d0
testq %rax, %rax
je 0x81d6
movq %r15, %rdi
callq 0x7fe2
movq %rax, %r15
jmp 0x8229
incq %rdi
movq %rdi, (%r13)
pushq $0x3e
popq %rsi
callq 0x40b0
movq %rax, %r14
testq %rax, %rax
jne 0x8191
leaq 0x5fdc(%rip), %rdi      # 0xe168
callq 0x42ec
movb $0x0, (%r14)
movq 0xc2d4(%rip), %rdi      # 0x14470
movq (%r13), %rsi
callq 0x87f8
testl %eax, %eax
je 0x81b2
movb $0x3e, (%r14)
jmp 0x82a0
leaq 0xacfb(%rip), %rax      # 0x12eb4
movslq (%rax), %rax
leaq 0xacfd(%rip), %rcx      # 0x12ec0
cmpl $0x0, (%rcx,%rax,4)
je 0x8306
movb $0x3e, (%r14)
jmp 0x82f0
movb $0x0, (%r12)
leaq 0x8f2e(%rip), %rax      # 0x11110
movq (%rax), %rdi
callq 0x40a0
movq %rax, %r15
movq (%r13), %rdi
callq 0x40a0
leal (%rax,%r15), %edi
addl $0x2, %edi
callq 0x4348
movq %rax, %r15
leaq 0x8f04(%rip), %rax      # 0x11110
movq (%rax), %rdx
movq (%r13), %rcx
leaq 0x5f68(%rip), %rsi      # 0xe182
movq %r15, %rdi
xorl %eax, %eax
callq 0x41a0
movb $0x2f, (%r12)
leaq 0x3244(%rip), %rsi      # 0xb474
movq %r15, %rdi
callq 0x4170
testq %rax, %rax
je 0x8278
movq %rax, %rdi
callq 0x4090
leaq 0xac64(%rip), %rax      # 0x12eb0
cmpl $0x2, (%rax)
jl 0x8262
leaq 0x5f30(%rip), %rdi      # 0xe188
movq %r15, %rsi
xorl %eax, %eax
callq 0x40c0
leaq 0x9c27(%rip), %rax      # 0x11e90
movl (%rax), %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x836a
jmp 0x829c
testq %r12, %r12
je 0x8289
movq (%r13), %rdi
callq 0x7fe2
movq %rax, %r15
movq 0xc1e0(%rip), %rdi      # 0x14470
movq %r15, %rsi
callq 0x87f8
testl %eax, %eax
je 0x82d5
movb $0x22, (%r14)
cmpl $0x2, 0xd1e5(%rip)      # 0x1548c
pushq $0x1
popq %r14
jl 0x82b9
leaq 0xb028(%rip), %rax      # 0x132dc
cmpl $0x0, (%rax)
jne 0x82f4
leaq 0x9bd0(%rip), %rax      # 0x11e90
movl (%rax), %esi
leaq 0x5efd(%rip), %rdi      # 0xe1c6
movq %rbx, %rdx
xorl %eax, %eax
callq 0x40c0
jmp 0x82f4
leaq 0xabd8(%rip), %rax      # 0x12eb4
movslq (%rax), %rax
leaq 0xabda(%rip), %rcx      # 0x12ec0
cmpl $0x0, (%rcx,%rax,4)
je 0x833a
movb $0x22, (%r14)
pushq $-0x1
popq %r14
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8ceb(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x8df9(%rip), %rax      # 0x11110
movq (%rax), %rdx
leaq 0x9b6f(%rip), %rax      # 0x11e90
movl (%rax), %ecx
movq (%r13), %r8
leaq 0x5e74(%rip), %rsi      # 0xe1a2
xorl %eax, %eax
callq 0x4150
jmp 0x81cd
movq 0x8cb7(%rip), %rax      # 0x10ff8
movq (%rax), %rdi
leaq 0x8dc5(%rip), %rax      # 0x11110
movq (%rax), %rdx
leaq 0x9b3b(%rip), %rax      # 0x11e90
movl (%rax), %ecx
leaq 0x5e44(%rip), %rsi      # 0xe1a2
movq %r15, %r8
xorl %eax, %eax
callq 0x4150
jmp 0x82ec