// File: /workspace/github_c_makefile_star2_O3/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, %r12
leaq 0xbb53(%rip), %rbx      # 0x142f0
testl %edi, %edi
jne 0x87c8
leaq 0xa6ec(%rip), %rax      # 0x12e94
cmpl $0x0, (%rax)
je 0x87c8
cmpl $0x0, (%rbx)
je 0x87c8
leaq 0x6995(%rip), %rdx      # 0xf14e
movl $0x13, %edi
movl $0x1, %esi
callq 0xa2f8
callq 0x4c5b
movl $0x0, (%rbx)
leaq 0xa6c6(%rip), %r13      # 0x12ea0
movq (%r13), %rdi
movzbl (%rdi), %eax
cmpl $0x3c, %eax
je 0x888a
xorl %r14d, %r14d
cmpl $0x22, %eax
jne 0x8a0b
movq %r12, -0x30(%rbp)
incq %rdi
movq %rdi, (%r13)
movl $0x22, %esi
callq 0x40b0
movq %rax, %r14
testq %rax, %rax
jne 0x881f
leaq 0x694e(%rip), %rdi      # 0xf168
callq 0x4a2c
movb $0x0, (%r14)
leaq 0x98e6(%rip), %rbx      # 0x12110
movq (%rbx), %rdi
movl $0x2f, %esi
callq 0x40d0
movq %rax, %r12
movq (%r13), %r15
testq %rax, %rax
je 0x8859
movq %r15, %rdi
movl $0x2f, %esi
callq 0x40d0
testq %rax, %rax
je 0x88f4
movq %r15, %rdi
callq 0x86bd
movq %rax, %r15
leaq 0x3c09(%rip), %rsi      # 0xc474
movq %rax, %rdi
callq 0x4170
testq %rax, %rax
jne 0x894d
testq %r12, %r12
jne 0x898c
jmp 0x8998
incq %rdi
movq %rdi, (%r13)
movl $0x3e, %esi
callq 0x40b0
movq %rax, %r14
testq %rax, %rax
jne 0x88af
leaq 0x68be(%rip), %rdi      # 0xf168
callq 0x4a2c
movb $0x0, (%r14)
movq 0xcbb6(%rip), %rdi      # 0x15470
movq (%r13), %rsi
callq 0x8e3c
testl %eax, %eax
je 0x88d0
movb $0x3e, (%r14)
jmp 0x89b3
leaq 0xb5dd(%rip), %rax      # 0x13eb4
movslq (%rax), %rax
leaq 0xb5df(%rip), %rcx      # 0x13ec0
cmpl $0x0, (%rcx,%rax,4)
je 0x8a1d
movb $0x3e, (%r14)
jmp 0x8a05
movb $0x0, (%r12)
movq (%rbx), %rdi
callq 0x40a0
movq %rax, %r15
movq (%r13), %rdi
callq 0x40a0
leal (%rax,%r15), %edi
addl $0x2, %edi
callq 0x4a8a
movq %rax, %r15
movq (%rbx), %rdx
movq (%r13), %rcx
leaq 0x6858(%rip), %rsi      # 0xf182
movq %rax, %rdi
xorl %eax, %eax
callq 0x41a0
movb $0x2f, (%r12)
leaq 0x3b34(%rip), %rsi      # 0xc474
movq %r15, %rdi
callq 0x4170
testq %rax, %rax
je 0x898c
movq -0x30(%rbp), %r12
movq %rax, %rdi
callq 0x4090
leaq 0xb550(%rip), %rax      # 0x13eb0
cmpl $0x2, (%rax)
jl 0x8976
leaq 0x681c(%rip), %rdi      # 0xf188
movq %r15, %rsi
xorl %eax, %eax
callq 0x40c0
leaq 0xa513(%rip), %rax      # 0x12e90
movl (%rax), %esi
movq %r12, %rdi
movq %r15, %rdx
callq 0x8a31
jmp 0x89af
movq (%r13), %rdi
callq 0x86bd
movq %rax, %r15
movq 0xcad1(%rip), %rdi      # 0x15470
movq %r15, %rsi
callq 0x8e3c
testl %eax, %eax
movq -0x30(%rbp), %r12
je 0x89ea
movb $0x22, (%r14)
cmpl $0x2, 0xdad2(%rip)      # 0x1648c
movl $0x1, %r14d
jl 0x89ce
leaq 0xb913(%rip), %rax      # 0x142dc
cmpl $0x0, (%rax)
jne 0x8a0b
leaq 0xa4bb(%rip), %rax      # 0x12e90
movl (%rax), %esi
leaq 0x67e8(%rip), %rdi      # 0xf1c6
movq %r12, %rdx
xorl %eax, %eax
callq 0x40c0
jmp 0x8a0b
leaq 0xb4c3(%rip), %rax      # 0x13eb4
movslq (%rax), %rax
leaq 0xb4c5(%rip), %rcx      # 0x13ec0
cmpl $0x0, (%rcx,%rax,4)
je 0x8a27
movb $0x22, (%r14)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4567
jmp 0x88eb
movq %r15, %rdi
callq 0x45a1
jmp 0x8a01