// File: /workspace/github_c_makefile_star2_O1/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 0xbadd(%rip), %rbx      # 0x142f0
testl %edi, %edi
jne 0x883e
leaq 0xa676(%rip), %rax      # 0x12e94
cmpl $0x0, (%rax)
je 0x883e
cmpl $0x0, (%rbx)
je 0x883e
leaq 0x6926(%rip), %rdx      # 0xf155
movl $0x13, %edi
movl $0x1, %esi
callq 0xa250
callq 0x4cdc
movl $0x0, (%rbx)
leaq 0xa650(%rip), %r13      # 0x12ea0
movq (%r13), %rdi
movzbl (%rdi), %eax
cmpl $0x3c, %eax
je 0x88d5
xorl %r14d, %r14d
cmpl $0x22, %eax
jne 0x8a5b
movq %r12, -0x30(%rbp)
incq %rdi
movq %rdi, (%r13)
movl $0x22, %esi
callq 0x40b0
movq %rax, %r14
testq %rax, %rax
jne 0x8891
leaq 0x68e3(%rip), %rdi      # 0xf16f
callq 0x4a9c
movb $0x0, (%r14)
leaq 0x9874(%rip), %rbx      # 0x12110
movq (%rbx), %rdi
movl $0x2f, %esi
callq 0x40d0
movq %rax, %r12
testq %rax, %rax
je 0x88c4
movq (%r13), %rdi
movl $0x2f, %esi
callq 0x40d0
testq %rax, %rax
je 0x893f
movq (%r13), %rdi
callq 0x8735
movq %rax, %r15
jmp 0x8984
incq %rdi
movq %rdi, (%r13)
movl $0x3e, %esi
callq 0x40b0
movq %rax, %r14
testq %rax, %rax
jne 0x88fa
leaq 0x687a(%rip), %rdi      # 0xf16f
callq 0x4a9c
movb $0x0, (%r14)
movq 0xcb6b(%rip), %rdi      # 0x15470
movq (%r13), %rsi
callq 0x8e8c
testl %eax, %eax
je 0x891b
movb $0x3e, (%r14)
jmp 0x8a03
leaq 0xb592(%rip), %rax      # 0x13eb4
movslq (%rax), %rax
leaq 0xb594(%rip), %rcx      # 0x13ec0
cmpl $0x0, (%rcx,%rax,4)
je 0x8a6d
movb $0x3e, (%r14)
jmp 0x8a55
movb $0x0, (%r12)
movq (%rbx), %rdi
callq 0x40a0
movq %rax, %r15
movq (%r13), %rdi
callq 0x40a0
leal (%rax,%r15), %edi
addl $0x2, %edi
callq 0x4afa
movq %rax, %r15
movq (%rbx), %rdx
movq (%r13), %rcx
leaq 0x6814(%rip), %rsi      # 0xf189
movq %rax, %rdi
xorl %eax, %eax
callq 0x41b0
movb $0x2f, (%r12)
leaq 0x3ae9(%rip), %rsi      # 0xc474
movq %r15, %rdi
callq 0x4180
testq %rax, %rax
je 0x89d7
movq %rax, %rdi
callq 0x4090
leaq 0xb509(%rip), %rax      # 0x13eb0
cmpl $0x2, (%rax)
jl 0x89bd
leaq 0x67dc(%rip), %rdi      # 0xf18f
movq %r15, %rsi
xorl %eax, %eax
callq 0x40c0
leaq 0xa4cc(%rip), %rax      # 0x12e90
movl (%rax), %esi
movq -0x30(%rbp), %r12
movq %r12, %rdi
movq %r15, %rdx
callq 0x8a81
jmp 0x89ff
testq %r12, %r12
je 0x89e8
movq (%r13), %rdi
callq 0x8735
movq %rax, %r15
movq 0xca81(%rip), %rdi      # 0x15470
movq %r15, %rsi
callq 0x8e8c
testl %eax, %eax
movq -0x30(%rbp), %r12
je 0x8a3a
movb $0x22, (%r14)
cmpl $0x2, 0xda82(%rip)      # 0x1648c
movl $0x1, %r14d
jl 0x8a1e
leaq 0xb8c3(%rip), %rax      # 0x142dc
cmpl $0x0, (%rax)
jne 0x8a5b
leaq 0xa46b(%rip), %rax      # 0x12e90
movl (%rax), %esi
leaq 0x679f(%rip), %rdi      # 0xf1cd
movq %r12, %rdx
xorl %eax, %eax
callq 0x40c0
jmp 0x8a5b
leaq 0xb473(%rip), %rax      # 0x13eb4
movslq (%rax), %rax
leaq 0xb475(%rip), %rcx      # 0x13ec0
cmpl $0x0, (%rcx,%rax,4)
je 0x8a77
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 0x4603
jmp 0x8936
movq %r15, %rdi
callq 0x463d
jmp 0x8a51