// File: /workspace/github_c_makefile_star2_O3/nimble-code[P]Uno/Src/uno_local.c
// Function: process_input
void
process_input(char *f)
{	FILE *fp;

	if (!CPRE)		/* if not set by the user on the command line */
	{
#ifdef CPP
		CPRE = CPP;	/* optional default set at uno-compilation time */
#else
		CPRE = "gcc -E";
#endif
	}

	if (!f || strstr(f, ".c") == NULL)
	{	if (f) printf("saw: %s\n", f);
		Usage("uno_local");
	}

	split_filename(f);

	if (working_dir != NULL)
	{	cpp2 = (char *) emalloc(strlen(working_dir)+1+2+strlen(cur_file)+1);
		sprintf(cpp2, "%s/__%s", working_dir, cur_file);

		cpp1 = (char *) emalloc(strlen(working_dir)+1+1+strlen(cur_file)+1);
		sprintf(cpp1, "%s/_%s", working_dir, cur_file);
	} else
	{	cpp2 = (char *) emalloc(strlen(cur_dir)+3+strlen(cur_file)+1);
		sprintf(cpp2, "%s/__%s", cur_dir, cur_file);

		cpp1 = (char *) emalloc(strlen(cur_dir)+2+strlen(cur_file)+1);
		sprintf(cpp1, "%s/_%s", cur_dir, cur_file);
	}

	cpp_cmd = (char *) emalloc(sizeof(char)*
			(strlen(CPRE)+
			(preproc_info?strlen(preproc_info):0)+
			strlen(f)+
			strlen(cpp2)+
			strlen("-I. ")+		/* just in case */
			32 ) );

	if (nopre)
	{	FILE *f1, *f2;
		char *x, buf[4096];

		if ((f1 = fopen(f, "r")) == NULL
		||  (f2 = fopen(cpp2, "w")) == NULL)
		{	fprintf(stderr, "uno: no file '%s', or cannot create '%s'\n", f, cpp2);
			exit(1);
		}
		add_pieces(f2, (char *) 0);
		fprintf(f2, "#line 1 \"%s\"\n", f);
		while (fgets(buf, sizeof(buf), f1))
		{	for (x = buf; *x == ' ' || *x == '\t'; x++)
				;
			if (strncmp(x, "#include", strlen("#include")) != 0) /* not an include */
				fprintf(f2, "%s", buf);
			else
				fprintf(f2, "\n");	/* maintain line count */
		}
		if (never) add_never(f2);

		fclose(f1);
		fclose(f2);
	} else
	{	if ((fp = fopen(cpp2, "w")) == NULL)
		{	fprintf(stderr, "uno: cannot create '%s'\n", cpp2);
			exit(1);
		}
		add_pieces(fp, f);
		fclose(fp);
	}

	if (working_dir != NULL)
		sprintf(cpp_cmd, "%s %s -I. %s >%s",
		CPRE, preproc_info?preproc_info:"", cpp2, cpp1);
	else
		sprintf(cpp_cmd, "%s %s %s >%s",
		CPRE, preproc_info?preproc_info:"", cpp2, cpp1);

	if (Verbose>1) printf("%s\n", cpp_cmd);

	if (system(cpp_cmd) != 0)
	{	fprintf(stderr, "preprocessing command '%s' failed\n", cpp_cmd);
		goto done;
	}

	if ((fp = fopen(cpp1, "r")) == NULL)
	{	fprintf(stderr, "uno: cannot open '%s'\n", cpp2);
		goto done;
	}

	init_nmetab();
	ParseStack = new_treestk();
	DoneStack  = new_treestk();
	contxt     = new_context();
	ParseStack->contxt = contxt;
	handle_new_file(ParseStack, fp, file_name);
	enter_scope(contxt);
	tree_parse(ParseStack, 0);	/* gram.y */
	name_scope(ParseStack->contxt, current_filename(), NONE_T);
	parse_tree = (top_of_stack(DoneStack))->parse_tree;
	fclose(fp);

	if (!parse_tree)
		fprintf(stderr, "uno: no parsetree for %s\n", f);
	else if (do_dflow)
	{	dflow_reset();
		walk_tree(parse_tree, 0);	/* dflow.c */

		if (viewtree)
		{	if (xrepro)
			{	print_recur(parse_tree, stdout);
			}
		} else
		{	if (xrepro)
			{	explore(f, parse_tree);
	}	}	}
done:
	clean_tmps();

	exit_scope(contxt);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
movq %rdi, %rbx
cmpq $0x0, 0x33277(%rip)     # 0x38228
jne 0x4fc1
leaq 0x1aaca(%rip), %rax     # 0x1fa84
movq %rax, 0x33267(%rip)     # 0x38228
testq %rbx, %rbx
je 0x5408
leaq 0x1acec(%rip), %rsi     # 0x1fcbd
movq %rbx, %rdi
callq 0x3280
testq %rax, %rax
je 0x53f7
movq %rbx, %rdi
callq 0x5421
movq 0x331f7(%rip), %rdi     # 0x381e8
testq %rdi, %rdi
jne 0x5006
leaq 0x33173(%rip), %r12     # 0x38170
movq 0x3316c(%rip), %rdi     # 0x38170
jmp 0x500d
leaq 0x331db(%rip), %r12     # 0x381e8
callq 0x30d0
movq %rax, %r14
movq 0x331ec(%rip), %rdi     # 0x38208
callq 0x30d0
leaq (%r14,%rax), %rdi
addq $0x4, %rdi
callq 0x5fdd
movq %rax, 0x331e3(%rip)     # 0x38218
movq (%r12), %rdx
movq 0x331c8(%rip), %rcx     # 0x38208
leaq 0x1aa57(%rip), %rsi     # 0x1fa9e
xorl %r14d, %r14d
movq %rax, %rdi
xorl %eax, %eax
callq 0x3250
movq (%r12), %rdi
callq 0x30d0
movq %rax, %r15
movq 0x331a1(%rip), %rdi     # 0x38208
callq 0x30d0
leaq (%r15,%rax), %rdi
addq $0x3, %rdi
callq 0x5fdd
movq %rax, 0x331a0(%rip)     # 0x38220
movq (%r12), %rdx
movq 0x3317d(%rip), %rcx     # 0x38208
leaq 0x1aa14(%rip), %rsi     # 0x1faa6
movq %rax, %rdi
xorl %eax, %eax
callq 0x3250
movq 0x33185(%rip), %rdi     # 0x38228
callq 0x30d0
movq %rax, %r15
movq 0x330d6(%rip), %rdi     # 0x38188
testq %rdi, %rdi
je 0x50bf
callq 0x30d0
movq %rax, %r14
movq %rbx, %rdi
callq 0x30d0
movq %rax, %r12
movq 0x33147(%rip), %rdi     # 0x38218
callq 0x30d0
addq %r14, %r12
addq %r12, %r15
leaq (%rax,%r15), %rdi
addq $0x24, %rdi
callq 0x5fdd
movq %rax, 0x33140(%rip)     # 0x38230
cmpb $0x1, 0x33109(%rip)     # 0x38200
jne 0x51eb
leaq 0x2a817(%rip), %rsi     # 0x2f91b
movq %rbx, %rdi
callq 0x3220
testq %rax, %rax
je 0x5414
movq %rax, %r14
movq 0x330f9(%rip), %rdi     # 0x38218
leaq 0x1aad9(%rip), %rsi     # 0x1fbff
callq 0x3220
testq %rax, %rax
je 0x5414
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x4cc4
leaq 0x1a771(%rip), %rsi     # 0x1f8b9
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x31a0
movq %rsp, %r12
movq %r12, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdx
callq 0x3170
testq %rax, %rax
je 0x51cc
leaq 0x1a963(%rip), %r13     # 0x1fad7
movq %r12, %rdi
movzbl (%rdi), %eax
cmpl $0x20, %eax
je 0x5184
cmpl $0x9, %eax
jne 0x5189
incq %rdi
jmp 0x5177
movl $0x8, %edx
movq %r13, %rsi
callq 0x3080
testl %eax, %eax
je 0x51a7
movq %r12, %rdi
movq %r15, %rsi
callq 0x3140
jmp 0x51b4
movl $0xa, %edi
movq %r15, %rsi
callq 0x3160
movq %r12, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdx
callq 0x3170
movq %r12, %rdi
testq %rax, %rax
jne 0x5177
cmpq $0x0, 0x33024(%rip)     # 0x381f8
je 0x51de
movq %r15, %rdi
callq 0x4837
movq %r14, %rdi
callq 0x30c0
movq %r15, %rdi
jmp 0x5218
movq 0x33026(%rip), %rdi     # 0x38218
leaq 0x1aa06(%rip), %rsi     # 0x1fbff
callq 0x3220
testq %rax, %rax
je 0x541c
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4cc4
movq %r14, %rdi
callq 0x30c0
movq 0x32f64(%rip), %rax     # 0x38188
testq %rax, %rax
leaq 0x1ab6d(%rip), %rcx     # 0x1fd9b
cmovneq %rax, %rcx
cmpq $0x0, 0x32fae(%rip)     # 0x381e8
movq 0x32fef(%rip), %rdi     # 0x38230
movq 0x32fe0(%rip), %rdx     # 0x38228
movq 0x32fc9(%rip), %r8      # 0x38218
movq 0x32fca(%rip), %r9      # 0x38220
leaq 0x1a8ad(%rip), %rax     # 0x1fb0a
leaq 0x1a895(%rip), %rsi     # 0x1faf9
cmoveq %rax, %rsi
xorl %eax, %eax
callq 0x3250
cmpl $0x2, 0x32fc2(%rip)     # 0x38238
jl 0x5284
movq 0x32fb1(%rip), %rdi     # 0x38230
callq 0x30a0
movq 0x32fa5(%rip), %rdi     # 0x38230
callq 0x30e0
testl %eax, %eax
jne 0x53ac
movq 0x32f81(%rip), %rdi     # 0x38220
leaq 0x2a675(%rip), %rsi     # 0x2f91b
callq 0x3220
testq %rax, %rax
je 0x53b3
movq %rax, %r14
callq 0x5ec5
callq 0x7d61
movq %rax, 0x32f08(%rip)     # 0x381d0
callq 0x7d61
movq %rax, 0x32f0c(%rip)     # 0x381e0
callq 0x6e82
movq %rax, 0x32f10(%rip)     # 0x381f0
movq 0x32ee9(%rip), %rdi     # 0x381d0
movq %rax, 0x10(%rdi)
movq 0x32ed6(%rip), %rdx     # 0x381c8
movq %r14, %rsi
callq 0x7f65
movq 0x32eef(%rip), %rdi     # 0x381f0
callq 0x6f2b
movq 0x32ec3(%rip), %rdi     # 0x381d0
xorl %esi, %esi
callq 0x7e4b
movq 0x32eb5(%rip), %rax     # 0x381d0
movq 0x10(%rax), %r15
callq 0xf572
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x6c60
movq 0x32ea8(%rip), %rdi     # 0x381e0
callq 0x7dda
movq (%rax), %rax
movq %rax, 0x32ef9(%rip)     # 0x38240
movq %r14, %rdi
callq 0x30c0
cmpq $0x0, 0x32ee9(%rip)     # 0x38240
je 0x53ba
callq 0xffc2
movq 0x32edb(%rip), %rdi     # 0x38240
xorl %esi, %esi
callq 0x1060c
cmpl $0x0, 0x32ed5(%rip)     # 0x38248
movl 0x32ed3(%rip), %eax     # 0x3824c
je 0x5397
testl %eax, %eax
je 0x53d5
movq 0x32eba(%rip), %rdi     # 0x38240
movq 0x32c43(%rip), %rax     # 0x37fd0
movq (%rax), %rsi
callq 0x130e7
jmp 0x53d5
testl %eax, %eax
je 0x53d5
movq 0x32e9e(%rip), %rsi     # 0x38240
movq %rbx, %rdi
callq 0x192dc
jmp 0x53d5
callq 0x32f7
jmp 0x53d5
callq 0x331c
jmp 0x53d5
movq 0x32c37(%rip), %rax     # 0x37ff8
movq (%rax), %rdi
leaq 0x1a786(%rip), %rsi     # 0x1fb51
movq %rbx, %rdx
xorl %eax, %eax
callq 0x31a0
callq 0x4f72
movq 0x32e0f(%rip), %rdi     # 0x381f0
callq 0x6f4d
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x1a68d(%rip), %rdi     # 0x1fa8b
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3100
leaq 0x1a685(%rip), %rdi     # 0x1fa94
callq 0x44ec
movq %rbx, %rdi
callq 0x3341
callq 0x32cf