// File: /workspace/github_c_makefile_star2_O0/nimble-code[P]Modex/Src/modex_pp.c
// Function: strip_sys_includes
void
strip_sys_includes(char *z, char *f, char *m)
{	FILE	*fd, *fo;
	char	buf[1024];
	char	*p;
	char	*match_what = NULL;
	char	*curfile    = NULL;
	int	first_directive = 1;

	*z = 'I';

	if ((fo = fopen(f, MFLAGS)) == NULL)	/* .I intermediate */
	{	fprintf(stderr, "modex: cannot create %s\n", f);
		goto clean;
	}
if (debug_io) fprintf(stderr, "fopen %s -> %p\n", f, fo);
	fprintf(fo, "#define pthread_t	int\n");
	fprintf(fo, "#define thread_t	int\n");
	fprintf(fo, "#define pthread_mutex_t	int\n");
	fprintf(fo, "#define pthread_cond_t	int\n");
	fprintf(fo, "#define mutex_t	int\n");
	fprintf(fo, "#define key_t	int\n");

	if ((fd = fopen(m, "r")) != NULL)	/* .dfn file -- if any */
	{	fprintf(fo, "#define UnoType	typedef int\n");
if (debug_io) fprintf(stderr, "fopen %s -> %p\n", m, fd);
		while (fgets(buf, 1024, fd))
			fprintf(fo, "%s", buf);
if (debug_io) fprintf(stderr, "close xx %p\n", fd);
		Fclose(fd);
	}
	fprintf(fo, "typedef int __builtin_va_list;\n"); /* gcc-ism */
	fprintf(fo, "typedef int __w64;\n");		 /* cl-ism */
	fprintf(fo, "typedef int _Bool;\n");		 /* c99 */
	fprintf(fo, "#define __restrict\n");		 /* gcc-ism */

	if (master_dfn)
	if ((fd = fopen(master_dfn, "r")) != NULL)	/* possible master .dfn file */
	{
if (debug_io) fprintf(stderr, "fopen %s -> %p\n", master_dfn, fd);
		while (fgets(buf, 1024, fd))
			fprintf(fo, "%s", buf);
if (debug_io) fprintf(stderr, "close yy %p\n", fd);
		Fclose(fd);
	}

	*z = 'c';
	if ((fd = fopen(f, "r")) == NULL)	/* .c file */
	{	fprintf(stderr, "%s: cannot open %s\n", progname, f);
		*z = 'I';	/* remove .I intermediate */
		unlink(f);
clean:		unlink("_modex_.run");
		exit(1);
	}
if (debug_io) fprintf(stderr, "--fopen %s -> %p\n", f, fd);

	fprintf(fo, "#line 1 \"%s\"\n", f);	/* restore linenumber and filename */

	while (fgets(buf, 1024, fd))
	{	if (buf[0] == '#')
		{	char *op;
			p = &buf[1];
			while (*p == ' ' || *p == '\t')
			{	p++;
			}
			op = p;

			/* eliminat output from external preprocessing
			   of system include files -- pan.c
			   will include the necessary files separately
			 */
			if (isdigit((int) *p)
			||  strncmp(p, "line", strlen("line")) == 0)	/* it is preprocessor output */
			{	char *q;
				q = p = strchr(p, '"');
				if (p)
				{	p++; q++;
					q = strchr(q, '"');
					if (q)
					{	*q = '\0';
						if (first_directive)
						{	match_what = (char *) e_malloc(strlen(p)+1);
							/* remember original filename: */
							strcpy(match_what, p);
							first_directive = 0;
						}
						curfile = (char *) e_malloc(strlen(p)+1);
						strcpy(curfile, p);
						continue;
				}	}
				p = op;
			}

			if (strncmp(p, "include", strlen("include")) == 0)
			{	p += strlen("include");
				while (*p == ' ' || *p == '\t')
					p++;
				if (sysoverride == 0
				&&  *p == '<')			/* system header file */
				{	fprintf(fo, "\n");	/* maintain linecount */
					continue;		/* skip it */
		}	}	}

		if (match_what
		&&  curfile
		&&  strcmp(match_what, curfile) != 0)
		{	continue;		/* preprocessed headers */
		}

		avoid_name_clash(buf, "empty");	/* empty -> Empty */
		avoid_name_clash(buf, "full");	/* full  -> Full */
		avoid_name_clash(buf, "init");	/* init  -> Init */
		avoid_name_clash(buf, "len");	/* len   -> Len */
		avoid_name_clash(buf, "skip");	/* skip  -> Skip */

		fprintf(fo, "%s", buf);
	}

if (debug_io) fprintf(stderr, "close 2x %p %p\n", fd, fo);

	Fclose(fd);
	Fclose(fo);
	fo = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x470, %rsp            # imm = 0x470
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x440(%rbp)
movq $0x0, -0x448(%rbp)
movl $0x1, -0x44c(%rbp)
movq -0x8(%rbp), %rax
movb $0x49, (%rax)
movq -0x10(%rbp), %rdi
leaq 0x9386(%rip), %rsi      # 0x3adaf
callq 0x4230
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x31a59
movq 0x135b9(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0xd591(%rip), %rsi      # 0x3efde
movb $0x0, %al
callq 0x4190
jmp 0x31d27
leaq 0x16188(%rip), %rax     # 0x47be8
cmpl $0x0, (%rax)
je 0x31a85
movq 0x1358c(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0xd6b0(%rip), %rsi      # 0x3f12e
movb $0x0, %al
callq 0x4190
movq -0x28(%rbp), %rdi
leaq 0xd567(%rip), %rsi      # 0x3eff7
movb $0x0, %al
callq 0x4190
movq -0x28(%rbp), %rdi
leaq 0xd56c(%rip), %rsi      # 0x3f00e
movb $0x0, %al
callq 0x4190
movq -0x28(%rbp), %rdi
leaq 0xd570(%rip), %rsi      # 0x3f024
movb $0x0, %al
callq 0x4190
movq -0x28(%rbp), %rdi
leaq 0xd57b(%rip), %rsi      # 0x3f041
movb $0x0, %al
callq 0x4190
movq -0x28(%rbp), %rdi
leaq 0xd585(%rip), %rsi      # 0x3f05d
movb $0x0, %al
callq 0x4190
movq -0x28(%rbp), %rdi
leaq 0xd588(%rip), %rsi      # 0x3f072
movb $0x0, %al
callq 0x4190
movq -0x18(%rbp), %rdi
leaq 0x45a7(%rip), %rsi      # 0x360a3
callq 0x4230
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x31bb6
movq -0x28(%rbp), %rdi
leaq 0xd56b(%rip), %rsi      # 0x3f085
movb $0x0, %al
callq 0x4190
leaq 0x160c0(%rip), %rax     # 0x47be8
cmpl $0x0, (%rax)
je 0x31b4d
movq 0x134c4(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0xd5e8(%rip), %rsi      # 0x3f12e
movb $0x0, %al
callq 0x4190
jmp 0x31b4f
leaq -0x430(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x4170
cmpq $0x0, %rax
je 0x31b85
movq -0x28(%rbp), %rdi
leaq -0x430(%rbp), %rdx
leaq 0x3c45(%rip), %rsi      # 0x357c1
movb $0x0, %al
callq 0x4190
jmp 0x31b4f
leaq 0x1605c(%rip), %rax     # 0x47be8
cmpl $0x0, (%rax)
je 0x31bad
movq 0x13460(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0xd4fc(%rip), %rsi      # 0x3f0a2
movb $0x0, %al
callq 0x4190
movq -0x20(%rbp), %rdi
callq 0x6d20
movq -0x28(%rbp), %rdi
leaq 0xd4ee(%rip), %rsi      # 0x3f0af
movb $0x0, %al
callq 0x4190
movq -0x28(%rbp), %rdi
leaq 0xd4fc(%rip), %rsi      # 0x3f0cf
movb $0x0, %al
callq 0x4190
movq -0x28(%rbp), %rdi
leaq 0xd4fe(%rip), %rsi      # 0x3f0e3
movb $0x0, %al
callq 0x4190
movq -0x28(%rbp), %rdi
leaq 0xd500(%rip), %rsi      # 0x3f0f7
movb $0x0, %al
callq 0x4190
leaq 0x1601b(%rip), %rax     # 0x47c20
cmpq $0x0, (%rax)
je 0x31cd0
leaq 0x1600a(%rip), %rax     # 0x47c20
movq (%rax), %rdi
leaq 0x4483(%rip), %rsi      # 0x360a3
callq 0x4230
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x31cce
leaq 0x15fae(%rip), %rax     # 0x47be8
cmpl $0x0, (%rax)
je 0x31c65
movq 0x133b2(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
leaq 0x15fd0(%rip), %rax     # 0x47c20
movq (%rax), %rdx
movq -0x20(%rbp), %rcx
leaq 0xd4d0(%rip), %rsi      # 0x3f12e
movb $0x0, %al
callq 0x4190
jmp 0x31c67
leaq -0x430(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x4170
cmpq $0x0, %rax
je 0x31c9d
movq -0x28(%rbp), %rdi
leaq -0x430(%rbp), %rdx
leaq 0x3b2d(%rip), %rsi      # 0x357c1
movb $0x0, %al
callq 0x4190
jmp 0x31c67
leaq 0x15f44(%rip), %rax     # 0x47be8
cmpl $0x0, (%rax)
je 0x31cc5
movq 0x13348(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
leaq 0xd44d(%rip), %rsi      # 0x3f10b
movb $0x0, %al
callq 0x4190
movq -0x20(%rbp), %rdi
callq 0x6d20
jmp 0x31cd0
movq -0x8(%rbp), %rax
movb $0x63, (%rax)
movq -0x10(%rbp), %rdi
leaq 0x43c1(%rip), %rsi      # 0x360a3
callq 0x4230
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x31d3d
movq 0x13300(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
leaq 0x1346e(%rip), %rax     # 0x45170
movq (%rax), %rdx
movq -0x10(%rbp), %rcx
leaq 0xd408(%rip), %rsi      # 0x3f118
movb $0x0, %al
callq 0x4190
movq -0x8(%rbp), %rax
movb $0x49, (%rax)
movq -0x10(%rbp), %rdi
callq 0x4070
leaq 0x2987(%rip), %rdi      # 0x346b5
callq 0x4070
movl $0x1, %edi
callq 0x4270
leaq 0x15ea4(%rip), %rax     # 0x47be8
cmpl $0x0, (%rax)
je 0x31d69
movq 0x132a8(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0xd3ca(%rip), %rsi      # 0x3f12c
movb $0x0, %al
callq 0x4190
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0xd3c6(%rip), %rsi      # 0x3f13e
movb $0x0, %al
callq 0x4190
leaq -0x430(%rbp), %rdi
movq -0x20(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x4170
cmpq $0x0, %rax
je 0x320ce
movsbl -0x430(%rbp), %eax
cmpl $0x23, %eax
jne 0x32020
leaq -0x430(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x438(%rbp)
movq -0x438(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x461(%rbp)
je 0x31ded
movq -0x438(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x461(%rbp)
movb -0x461(%rbp), %al
testb $0x1, %al
jne 0x31df9
jmp 0x31e0d
movq -0x438(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x438(%rbp)
jmp 0x31dc0
movq -0x438(%rbp), %rax
movq %rax, -0x458(%rbp)
callq 0x4290
movq (%rax), %rax
movq -0x438(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x31e5f
movq -0x438(%rbp), %rdi
leaq 0x25a4(%rip), %rsi      # 0x343f0
movl $0x4, %edx
callq 0x4090
cmpl $0x0, %eax
jne 0x31f6a
movq -0x438(%rbp), %rdi
movl $0x22, %esi
callq 0x4110
movq %rax, -0x438(%rbp)
movq %rax, -0x460(%rbp)
cmpq $0x0, -0x438(%rbp)
je 0x31f5c
movq -0x438(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x438(%rbp)
movq -0x460(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x460(%rbp)
movq -0x460(%rbp), %rdi
movl $0x22, %esi
callq 0x4110
movq %rax, -0x460(%rbp)
cmpq $0x0, -0x460(%rbp)
je 0x31f5a
movq -0x460(%rbp), %rax
movb $0x0, (%rax)
cmpl $0x0, -0x44c(%rbp)
je 0x31f24
movq -0x438(%rbp), %rdi
callq 0x40f0
addq $0x1, %rax
movl %eax, %edi
callq 0x4a70
movq %rax, -0x440(%rbp)
movq -0x440(%rbp), %rdi
movq -0x438(%rbp), %rsi
callq 0x40a0
movl $0x0, -0x44c(%rbp)
movq -0x438(%rbp), %rdi
callq 0x40f0
addq $0x1, %rax
movl %eax, %edi
callq 0x4a70
movq %rax, -0x448(%rbp)
movq -0x448(%rbp), %rdi
movq -0x438(%rbp), %rsi
callq 0x40a0
jmp 0x31d7f
jmp 0x31f5c
movq -0x458(%rbp), %rax
movq %rax, -0x438(%rbp)
movq -0x438(%rbp), %rdi
leaq 0xd1d4(%rip), %rsi      # 0x3f14c
movl $0x7, %edx
callq 0x4090
cmpl $0x0, %eax
jne 0x3201e
movq -0x438(%rbp), %rax
addq $0x7, %rax
movq %rax, -0x438(%rbp)
movq -0x438(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x462(%rbp)
je 0x31fca
movq -0x438(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x462(%rbp)
movb -0x462(%rbp), %al
testb $0x1, %al
jne 0x31fd6
jmp 0x31fea
movq -0x438(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x438(%rbp)
jmp 0x31f9d
leaq 0x15c1f(%rip), %rax     # 0x47c10
cmpl $0x0, (%rax)
jne 0x3201c
movq -0x438(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3c, %eax
jne 0x3201c
movq -0x28(%rbp), %rdi
leaq 0x3a47(%rip), %rsi      # 0x35a57
movb $0x0, %al
callq 0x4190
jmp 0x31d7f
jmp 0x3201e
jmp 0x32020
cmpq $0x0, -0x440(%rbp)
je 0x32051
cmpq $0x0, -0x448(%rbp)
je 0x32051
movq -0x440(%rbp), %rdi
movq -0x448(%rbp), %rsi
callq 0x4180
cmpl $0x0, %eax
je 0x32051
jmp 0x31d7f
leaq -0x430(%rbp), %rdi
leaq 0xd0f5(%rip), %rsi      # 0x3f154
callq 0x32120
leaq -0x430(%rbp), %rdi
leaq 0xd0e8(%rip), %rsi      # 0x3f15a
callq 0x32120
leaq -0x430(%rbp), %rdi
leaq 0x4ec7(%rip), %rsi      # 0x36f4c
callq 0x32120
leaq -0x430(%rbp), %rdi
leaq 0xd0c7(%rip), %rsi      # 0x3f15f
callq 0x32120
leaq -0x430(%rbp), %rdi
leaq 0xd0b8(%rip), %rsi      # 0x3f163
callq 0x32120
movq -0x28(%rbp), %rdi
leaq -0x430(%rbp), %rdx
leaq 0x36ff(%rip), %rsi      # 0x357c1
movb $0x0, %al
callq 0x4190
jmp 0x31d7f
leaq 0x15b13(%rip), %rax     # 0x47be8
cmpl $0x0, (%rax)
je 0x320fa
movq 0x12f17(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0xd075(%rip), %rsi      # 0x3f168
movb $0x0, %al
callq 0x4190
movq -0x20(%rbp), %rdi
callq 0x6d20
movq -0x28(%rbp), %rdi
callq 0x6d20
movq $0x0, -0x28(%rbp)
addq $0x470, %rsp            # imm = 0x470
popq %rbp
retq
nopl (%rax)