// File: /workspace/github_c_makefile_star2_O1/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 0x21dbd
movq %rsi, %r15
leaq 0x144e(%rip), %rsi      # 0x23065
movq %rbx, %rdi
callq 0x42c0
testq %rax, %rax
je 0x21dbd
movq %rax, %r14
movq %rax, %r12
incq %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x21590
movb $0x4d, 0x1(%r12)
leaq 0x1da34(%rip), %r15     # 0x3f680
movq %r15, %rdi
movq %rbx, %rsi
callq 0x40b0
movb $0x49, 0x1(%r12)
leaq 0x15554(%rip), %rax     # 0x371b8
movq (%rax), %rdi
callq 0x4110
movq %rax, %r12
leaq 0x15552(%rip), %rbp     # 0x371c8
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 0x6469
movq %rax, %r15
leaq 0x17d83(%rip), %rax     # 0x39a34
cmpl $0x0, (%rax)
movq (%rbp), %rcx
je 0x21d01
leaq 0xce2b(%rip), %rsi      # 0x2eaec
leaq 0x1d9b8(%rip), %r8      # 0x3f680
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4290
leaq 0x17d90(%rip), %rax     # 0x39a6c
cmpl $0x0, (%rax)
je 0x21cf2
leaq 0x266a(%rip), %rdi      # 0x24352
movq %r15, %rsi
xorl %eax, %eax
callq 0x4140
movq %r15, %rdi
callq 0x4120
movl %eax, %ebp
jmp 0x21d94
leaq 0x154b0(%rip), %r13     # 0x371b8
leaq 0xcdfe(%rip), %rsi      # 0x2eb0d
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4290
leaq 0x17d49(%rip), %r12     # 0x39a6c
cmpl $0x0, (%r12)
je 0x21d3b
leaq 0x2621(%rip), %rdi      # 0x24352
movq %r15, %rsi
xorl %eax, %eax
callq 0x4140
movq %r15, %rdi
callq 0x4120
movq (%r13), %rcx
leaq 0xcdf3(%rip), %rsi      # 0x2eb41
leaq 0x281a(%rip), %rdx      # 0x2456f
leaq 0x1d924(%rip), %r8      # 0x3f680
movq %r15, %rdi
xorl %eax, %eax
callq 0x4290
movq %r15, %rdi
callq 0x4120
movl %eax, %ebp
cmpl $0x0, (%r12)
je 0x21d88
leaq 0x25d4(%rip), %rdi      # 0x24352
movq %r15, %rsi
xorl %eax, %eax
callq 0x4140
leaq 0xcdaa(%rip), %rdi      # 0x2eb39
callq 0x4080
leaq 0x17cd1(%rip), %rax     # 0x39a6c
cmpl $0x0, (%rax)
jne 0x21da8
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 %rbx, %rdi
callq 0x5ec3
nopl (%rax)