// File: /workspace/github_c_makefile_star2_O2/nimble-code[P]Modex/Src/modex_pp.c
// Function: modex_pp
int
modex_pp(char *f, char *m)
{	char	*cpp_cmmd;
	char	*g, origf[1024], *z;
	int	retval;

	g = &tempfile_M[0];

	if (!f || (z = strstr(f, ".c")) == NULL)
	{	fprintf(stderr, "%s: cannot happen <%s>\n", progname, f);
		exit(1);
	}
	strcpy(origf, f);		/* origf = .c original */
	z++;

	strip_sys_includes(z, f, m);	/* creates .I from .dfn(s), .c and prop */

	*z = 'M';
	strcpy(g, f);			/* g = .M intermediate */
	*z = 'I';			/* f = .I intermediate */

	cpp_cmmd = (char *)
		e_malloc((unsigned int)(sizeof(char)*
			(32
			+ strlen(preproc_info)
			+ strlen(sedproc_info)
			+ strlen(f)
			+ strlen(g))));

	if (nopre)
	{	sprintf(cpp_cmmd, "cat %s | %s | grep -v \"^ *#\" >%s",
			f, sedproc_info, g);

		if (Verbose) printf("<%s>\n", cpp_cmmd);

		retval = system(cpp_cmmd);
	} else
	{
#define NO_REDEF_ASSERT
#ifdef NO_REDEF_ASSERT
		// remove an undesired code patch from the tacas contest files
		sprintf(cpp_cmmd, "cat %s | %s | grep -v -e \"#define assert\" > _m_tmp_",
			f, sedproc_info);

		if (Verbose) printf("<%s>\n", cpp_cmmd);

		system(cpp_cmmd);

		sprintf(cpp_cmmd, "%s -DMODEX %s _m_tmp_ >%s",
			CPP, preproc_info, g);
#else
		sprintf(cpp_cmmd, "cat %s | %s | %s -x c -DMODEX %s >%s",
			f, sedproc_info, CPP, preproc_info, g);
#endif
		retval = system(cpp_cmmd);			/* produce .M */

		if (Verbose) printf("<%s>\n", cpp_cmmd);

#ifdef NO_REDEF_ASSERT
		unlink("_m_tmp_");	// remove intermediate file
#endif
	}

	if (!Verbose) unlink(f);				/* remove the .I file */

	*z = 'c';	/* restore */
	return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
je 0x1f6d0
movq %rsi, %r15
leaq 0xb3b(%rip), %rsi       # 0x20065
movq %rbx, %rdi
callq 0x42d0
testq %rax, %rax
je 0x1f6d0
movq %rax, %r14
movq %rax, %r12
incq %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1eeac
movb $0x4d, 0x1(%r12)
leaq 0x1d131(%rip), %r15     # 0x3c690
movq %r15, %rdi
movq %rbx, %rsi
callq 0x40b0
movb $0x49, 0x1(%r12)
leaq 0x14c51(%rip), %rax     # 0x341c8
movq (%rax), %rdi
callq 0x4110
movq %rax, %r12
leaq 0x14c4f(%rip), %rbp     # 0x341d8
movq (%rbp), %rdi
callq 0x4110
movq %rax, %r13
addl %r12d, %r13d
movq %rbx, %rdi
callq 0x4110
movq %rax, %r12
addl %r13d, %r12d
movq %r15, %rdi
callq 0x4110
leal (%rax,%r12), %edi
addl $0x20, %edi
callq 0x4739
movq %rax, %r15
leaq 0x17480(%rip), %rax     # 0x36a44
cmpl $0x0, (%rax)
movq (%rbp), %rcx
je 0x1f614
leaq 0xc424(%rip), %rsi      # 0x2b9f8
leaq 0x1d0b5(%rip), %r8      # 0x3c690
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x42a0
leaq 0x1748d(%rip), %rax     # 0x36a7c
cmpl $0x0, (%rax)
je 0x1f605
leaq 0x1d57(%rip), %rdi      # 0x21352
movq %r15, %rsi
xorl %eax, %eax
callq 0x4140
movq %r15, %rdi
callq 0x4120
movl %eax, %ebp
jmp 0x1f6a7
leaq 0x14bad(%rip), %r13     # 0x341c8
leaq 0xc3f7(%rip), %rsi      # 0x2ba19
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x42a0
leaq 0x17446(%rip), %r12     # 0x36a7c
cmpl $0x0, (%r12)
je 0x1f64e
leaq 0x1d0e(%rip), %rdi      # 0x21352
movq %r15, %rsi
xorl %eax, %eax
callq 0x4140
movq %r15, %rdi
callq 0x4120
movq (%r13), %rcx
leaq 0xc3ec(%rip), %rsi      # 0x2ba4d
leaq 0x1f07(%rip), %rdx      # 0x2156f
leaq 0x1d021(%rip), %r8      # 0x3c690
movq %r15, %rdi
xorl %eax, %eax
callq 0x42a0
movq %r15, %rdi
callq 0x4120
movl %eax, %ebp
cmpl $0x0, (%r12)
je 0x1f69b
leaq 0x1cc1(%rip), %rdi      # 0x21352
movq %r15, %rsi
xorl %eax, %eax
callq 0x4140
leaq 0xc3a3(%rip), %rdi      # 0x2ba45
callq 0x4080
leaq 0x173ce(%rip), %rax     # 0x36a7c
cmpl $0x0, (%rax)
jne 0x1f6bb
movq %rbx, %rdi
callq 0x4080
movb $0x63, (%r14)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x14921(%rip), %rax     # 0x33ff8
movq (%rax), %rdi
leaq 0x14abf(%rip), %rax     # 0x341a0
movq (%rax), %rdx
leaq 0xc2f5(%rip), %rsi      # 0x2b9e0
movq %rbx, %rcx
xorl %eax, %eax
callq 0x41c0
pushq $0x1
popq %rdi
callq 0x42b0
nopl (%rax)