// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %rdi, %r12
cmpq $0x0, 0x33460(%rip)     # 0x37228
jne 0x3dd8
leaq 0x19cb3(%rip), %rax     # 0x1da84
movq %rax, 0x33450(%rip)     # 0x37228
testq %r12, %r12
je 0x42fc
leaq 0x19ed5(%rip), %rsi     # 0x1dcbd
movq %r12, %rdi
callq 0x3290
testq %rax, %rax
je 0x42eb
movq %r12, %rdi
callq 0x30d0
leaq 0x1(%rax), %rdi
callq 0x4da5
movq %rax, 0x3347f(%rip)     # 0x37290
movq %rax, %rdi
movq %r12, %rsi
callq 0x3090
pushq $0x2f
popq %rsi
movq %r12, %rdi
callq 0x3120
testq %rax, %rax
je 0x3e5c
movq %rax, %r14
subq %r12, %r14
leaq 0x1(%r14), %rbx
movq %rbx, %rdi
callq 0x4da5
movq %rax, 0x33333(%rip)     # 0x37178
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x3070
addq 0x33436(%rip), %rbx     # 0x37290
jmp 0x3e71
leaq 0x1a3ae(%rip), %rax     # 0x1e211
movq %rax, 0x3330e(%rip)     # 0x37178
movq 0x3341f(%rip), %rbx     # 0x37290
movq %rbx, 0x33390(%rip)     # 0x37208
cmpl $0x2, 0x333b9(%rip)     # 0x37238
jge 0x424f
movq 0x3335c(%rip), %rdi     # 0x371e8
testq %rdi, %rdi
jne 0x3ea1
leaq 0x332e0(%rip), %r15     # 0x37178
movq 0x332d9(%rip), %rdi     # 0x37178
jmp 0x3ea8
leaq 0x33340(%rip), %r15     # 0x371e8
callq 0x30d0
movq %rax, %rbx
movq 0x33351(%rip), %rdi     # 0x37208
callq 0x30d0
leaq (%rbx,%rax), %rdi
addq $0x4, %rdi
callq 0x4da5
movq %rax, 0x33348(%rip)     # 0x37218
movq (%r15), %rdx
movq 0x3332e(%rip), %rcx     # 0x37208
leaq 0x19bbd(%rip), %rsi     # 0x1da9e
xorl %r14d, %r14d
movq %rax, %rdi
xorl %eax, %eax
callq 0x3260
movq (%r15), %rdi
callq 0x30d0
movq %rax, %rbx
movq 0x33308(%rip), %rdi     # 0x37208
callq 0x30d0
leaq (%rbx,%rax), %rdi
addq $0x3, %rdi
callq 0x4da5
movq %rax, 0x33307(%rip)     # 0x37220
movq (%r15), %rdx
movq 0x332e5(%rip), %rcx     # 0x37208
leaq 0x19b7c(%rip), %rsi     # 0x1daa6
movq %rax, %rdi
xorl %eax, %eax
callq 0x3260
movq 0x332ed(%rip), %rdi     # 0x37228
callq 0x30d0
movq %rax, %rbx
movq 0x33246(%rip), %rdi     # 0x37190
testq %rdi, %rdi
je 0x3f57
callq 0x30d0
movq %rax, %r14
movq %r12, %rdi
callq 0x30d0
movq %rax, %r15
movq 0x332af(%rip), %rdi     # 0x37218
callq 0x30d0
addq %r14, %r15
addq %r15, %rbx
leaq (%rax,%rbx), %rdi
addq $0x24, %rdi
callq 0x4da5
movq %rax, 0x332a8(%rip)     # 0x37230
cmpb $0x1, 0x33271(%rip)     # 0x37200
jne 0x4056
leaq 0x2999f(%rip), %rsi     # 0x2d93b
movq %r12, %rdi
callq 0x3230
testq %rax, %rax
je 0x4308
movq %rax, %r14
movq 0x33261(%rip), %rdi     # 0x37218
leaq 0x19c41(%rip), %rsi     # 0x1dbff
callq 0x3230
testq %rax, %rax
je 0x4308
movq %rax, %r15
movq %rax, %rdi
xorl %esi, %esi
callq 0x3b1e
leaq 0x198d9(%rip), %rsi     # 0x1d8b9
movq %r15, %rdi
movq %r12, 0x8(%rsp)
movq %r12, %rdx
xorl %eax, %eax
callq 0x31a0
leaq 0x10(%rsp), %r12
leaq 0x19ad9(%rip), %r13     # 0x1dad7
pushq $0x8
popq %rbp
pushq $0xa
popq %rbx
movq %r12, %rdi
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdx
callq 0x3170
testq %rax, %rax
je 0x408a
movq %r12, %rdi
movzbl (%rdi), %eax
cmpl $0x20, %eax
je 0x4029
cmpl $0x9, %eax
jne 0x402e
incq %rdi
jmp 0x401c
movq %r13, %rsi
movq %rbp, %rdx
callq 0x3080
testl %eax, %eax
je 0x404a
movq %r12, %rdi
movq %r15, %rsi
callq 0x3140
jmp 0x4004
movl %ebx, %edi
movq %r15, %rsi
callq 0x3160
jmp 0x4004
movq 0x331bb(%rip), %rdi     # 0x37218
leaq 0x19b9b(%rip), %rsi     # 0x1dbff
callq 0x3230
testq %rax, %rax
je 0x432c
movq %rax, %rbx
movq %rax, %rdi
movq %r12, %rsi
callq 0x3b1e
movq %rbx, %rdi
callq 0x30c0
jmp 0x40b1
cmpq $0x0, 0x33166(%rip)     # 0x371f8
je 0x409c
movq %r15, %rdi
callq 0x36bc
movq %r14, %rdi
callq 0x30c0
movq %r15, %rdi
callq 0x30c0
movq 0x8(%rsp), %r12
movq 0x330d8(%rip), %rax     # 0x37190
testq %rax, %rax
leaq 0x19cd9(%rip), %rcx     # 0x1dd9b
cmovneq %rax, %rcx
cmpq $0x0, 0x3311a(%rip)     # 0x371e8
movq 0x3315b(%rip), %rdi     # 0x37230
movq 0x3314c(%rip), %rdx     # 0x37228
movq 0x33135(%rip), %r8      # 0x37218
movq 0x33136(%rip), %r9      # 0x37220
leaq 0x19a19(%rip), %rax     # 0x1db0a
leaq 0x19a01(%rip), %rsi     # 0x1daf9
cmoveq %rax, %rsi
xorl %eax, %eax
callq 0x3260
cmpl $0x2, 0x3312e(%rip)     # 0x37238
jl 0x4118
movq 0x3311d(%rip), %rdi     # 0x37230
callq 0x30a0
movq 0x33111(%rip), %rdi     # 0x37230
callq 0x30e0
testl %eax, %eax
jne 0x4279
movq 0x330ed(%rip), %rdi     # 0x37220
leaq 0x29801(%rip), %rsi     # 0x2d93b
callq 0x3230
testq %rax, %rax
je 0x4293
movq %rax, %r14
callq 0x4cb5
callq 0x6c2b
movq %rax, 0x33074(%rip)     # 0x371d0
callq 0x6c2b
movq %rax, 0x33078(%rip)     # 0x371e0
callq 0x5ad5
movq %rax, 0x3307c(%rip)     # 0x371f0
movq 0x33055(%rip), %rdi     # 0x371d0
movq %rax, 0x10(%rdi)
movq 0x33042(%rip), %rdx     # 0x371c8
movq %r14, %rsi
callq 0x6dd1
movq 0x3305b(%rip), %rdi     # 0x371f0
callq 0x5b47
movq 0x3302f(%rip), %rdi     # 0x371d0
xorl %esi, %esi
callq 0x6d08
movq 0x33021(%rip), %rax     # 0x371d0
movq 0x10(%rax), %rbx
callq 0xe897
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x58c3
movq 0x33014(%rip), %rdi     # 0x371e0
callq 0x6c9a
movq (%rax), %rax
movq %rax, 0x33065(%rip)     # 0x37240
movq %r14, %rdi
callq 0x30c0
cmpq $0x0, 0x33055(%rip)     # 0x37240
je 0x42ad
callq 0xf21c
movq 0x33043(%rip), %rdi     # 0x37240
xorl %esi, %esi
callq 0xf764
cmpl $0x0, 0x3303d(%rip)     # 0x37248
movl 0x3303b(%rip), %eax     # 0x3724c
je 0x4236
testl %eax, %eax
je 0x42c8
movq 0x3301e(%rip), %rdi     # 0x37240
movq 0x32da7(%rip), %rax     # 0x36fd0
movq (%rax), %rsi
callq 0x11ee9
jmp 0x42c8
testl %eax, %eax
je 0x42c8
movq 0x32ffb(%rip), %rsi     # 0x37240
movq %r12, %rdi
callq 0x17080
jmp 0x42c8
movq 0x32da2(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
movq 0x32f18(%rip), %rcx     # 0x37178
leaq 0x199e9(%rip), %rsi     # 0x1dc50
movq %r12, %rdx
movq %rbx, %r8
xorl %eax, %eax
callq 0x31a0
jmp 0x3e85
movq 0x32d78(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
movq 0x32fa6(%rip), %rdx     # 0x37230
leaq 0x19886(%rip), %rsi     # 0x1db17
jmp 0x42c1
movq 0x32d5e(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
movq 0x32f74(%rip), %rdx     # 0x37218
leaq 0x1988f(%rip), %rsi     # 0x1db3a
jmp 0x42c1
movq 0x32d44(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
leaq 0x19893(%rip), %rsi     # 0x1db51
movq %r12, %rdx
xorl %eax, %eax
callq 0x31a0
callq 0x3d88
movq 0x32f1c(%rip), %rdi     # 0x371f0
callq 0x5b69
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19799(%rip), %rdi     # 0x1da8b
movq %r12, %rsi
xorl %eax, %eax
callq 0x3100
leaq 0x19791(%rip), %rdi     # 0x1da94
callq 0x33ac
movq 0x32ce9(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
movq 0x32eff(%rip), %rcx     # 0x37218
leaq 0x1978d(%rip), %rsi     # 0x1daad
movq %r12, %rdx
xorl %eax, %eax
callq 0x31a0
jmp 0x434b
movq 0x32cc5(%rip), %rax     # 0x36ff8
movq (%rax), %rdi
movq 0x32edb(%rip), %rdx     # 0x37218
leaq 0x1979c(%rip), %rsi     # 0x1dae0
xorl %eax, %eax
callq 0x31a0
pushq $0x1
popq %rdi
callq 0x3270