// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x1b626(%rip), %rax     # 0x4d860
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x32262
movq -0x8(%rbp), %rdi
leaq 0xdf9(%rip), %rsi       # 0x33049
callq 0x4280
movq %rax, -0x428(%rbp)
cmpq $0x0, %rax
jne 0x32292
movq 0x12d8f(%rip), %rax     # 0x44ff8
movq (%rax), %rdi
leaq 0x12efd(%rip), %rax     # 0x45170
movq (%rax), %rdx
movq -0x8(%rbp), %rcx
leaq 0xcef7(%rip), %rsi      # 0x3f178
movb $0x0, %al
callq 0x4190
movl $0x1, %edi
callq 0x4270
leaq -0x420(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x40a0
movq -0x428(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x428(%rbp)
movq -0x428(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x319e0
movq -0x428(%rbp), %rax
movb $0x4d, (%rax)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x40a0
movq -0x428(%rbp), %rax
movb $0x49, (%rax)
leaq 0x12ea8(%rip), %rax     # 0x45198
movq (%rax), %rdi
callq 0x40f0
addq $0x20, %rax
movq %rax, -0x448(%rbp)
leaq 0x12e9e(%rip), %rax     # 0x451a8
movq (%rax), %rdi
callq 0x40f0
movq %rax, %rcx
movq -0x448(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x440(%rbp)
movq -0x8(%rbp), %rdi
callq 0x40f0
movq %rax, %rcx
movq -0x440(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x438(%rbp)
movq -0x20(%rbp), %rdi
callq 0x40f0
movq %rax, %rcx
movq -0x438(%rbp), %rax
addq %rcx, %rax
shlq $0x0, %rax
movl %eax, %edi
callq 0x4a70
movq %rax, -0x18(%rbp)
leaq 0x158a5(%rip), %rax     # 0x47c14
cmpl $0x0, (%rax)
je 0x323ca
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0x12e25(%rip), %rax     # 0x451a8
movq (%rax), %rcx
movq -0x20(%rbp), %r8
leaq 0xcdff(%rip), %rsi      # 0x3f190
movb $0x0, %al
callq 0x4260
leaq 0x158ad(%rip), %rax     # 0x47c4c
cmpl $0x0, (%rax)
je 0x323b6
movq -0x18(%rbp), %rsi
leaq 0x20d7(%rip), %rdi      # 0x34486
movb $0x0, %al
callq 0x4120
movq -0x18(%rbp), %rdi
callq 0x4100
movl %eax, -0x42c(%rbp)
jmp 0x32471
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rdx
leaq 0x12dcf(%rip), %rax     # 0x451a8
movq (%rax), %rcx
leaq 0xcdce(%rip), %rsi      # 0x3f1b1
movb $0x0, %al
callq 0x4260
leaq 0x1585b(%rip), %rax     # 0x47c4c
cmpl $0x0, (%rax)
je 0x32408
movq -0x18(%rbp), %rsi
leaq 0x2085(%rip), %rdi      # 0x34486
movb $0x0, %al
callq 0x4120
movq -0x18(%rbp), %rdi
callq 0x4100
movq -0x18(%rbp), %rdi
leaq 0x12d7c(%rip), %rax     # 0x45198
movq (%rax), %rcx
movq -0x20(%rbp), %r8
leaq 0xcdbb(%rip), %rsi      # 0x3f1e5
leaq 0x2272(%rip), %rdx      # 0x346a3
movb $0x0, %al
callq 0x4260
movq -0x18(%rbp), %rdi
callq 0x4100
movl %eax, -0x42c(%rbp)
leaq 0x157fe(%rip), %rax     # 0x47c4c
cmpl $0x0, (%rax)
je 0x32465
movq -0x18(%rbp), %rsi
leaq 0x2028(%rip), %rdi      # 0x34486
movb $0x0, %al
callq 0x4120
leaq 0xcd71(%rip), %rdi      # 0x3f1dd
callq 0x4070
leaq 0x157d4(%rip), %rax     # 0x47c4c
cmpl $0x0, (%rax)
jne 0x32486
movq -0x8(%rbp), %rdi
callq 0x4070
movq -0x428(%rbp), %rax
movb $0x63, (%rax)
movl -0x42c(%rbp), %eax
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nop