// File: /workspace/github_c_makefile_star2_O3/rakitzis[P]rc/main.c
// Function: main
extern int main(int argc, char *argv[], char *envp[]) {
	char *dollarzero, *null[1];
	int c;
	initprint();
	dashsee[0] = dashsee[1] = NULL;
	dollarzero = argv[0];
	rc_pid = getpid();
	dashell = (*argv[0] == '-'); /* Unix tradition */
	while ((c = rc_getopt(argc, argv, "c:deiIlnopsvx")) != -1)
		switch (c) {
		case 'c':
			dashsee[0] = rc_optarg;
			goto quitopts;
		case 'd':
			dashdee = TRUE;
			break;
		case 'e':
			dashee = TRUE;
			break;
		case 'I':
			dashEYE = TRUE;
			interactive = FALSE;
			break;
		case 'i':
			dasheye = interactive = TRUE;
			break;
		case 'l':
			dashell = TRUE;
			break;
		case 'n':
			dashen = TRUE;
			break;
		case 'o':
			dashoh = TRUE;
			break;
		case 'p':
			dashpee = TRUE;
			break;
		case 's':
			dashess = TRUE;
			break;
		case 'v':
			dashvee = TRUE;
			break;
		case 'x':
			dashex = TRUE;
			break;
		case '?':
			exit(1);
		}
quitopts:
	argv += rc_optind;
	/* use isatty() iff neither -i nor -I is set, and iff the input is not
	 * from a script or -c flags */
	if (!dasheye && !dashEYE && dashsee[0] == NULL &&
			(dashess || *argv == NULL))
		interactive = isatty(0);
	if (!dashoh) {
		checkfd(0, rFrom);
		checkfd(1, rCreate);
		checkfd(2, rCreate);
	}
	initsignal();
	inithash();
	initparse();
	assigndefault("ifs", " ", "\t", "\n", (void *)0);
	assigndefault("nl", "\n", (void *)0);
#ifdef DEFAULTPATH
	assigndefault("path", DEFAULTPATH, (void *)0);
#endif
	assigndefault("pid", nprint("%d", rc_pid), (void *)0);
	assigndefault("prompt", "; ", "", (void *)0);
	assigndefault("tab", "\t", (void *)0);
	assigndefault("version", VERSION, (void *)0);
	initenv(envp);
	initinput();
	null[0] = NULL;
	starassign(dollarzero, null, FALSE); /* assign $0 to $* */
	inithandler();

	if (dashell) {
		char *rcrc;
		int fd;

		rcrc = concat(varlookup("home"), word("/.rcrc", NULL))->w;
		fd = rc_open(rcrc, rFrom);
		if (fd == -1) {
			if (errno != ENOENT)
				uerror(rcrc);
		} else {
			bool push_interactive;

			pushfd(fd);
			push_interactive = interactive;
			interactive = FALSE;
			doit(TRUE);
			interactive = push_interactive;
			close(fd);
		}
	}
	environ = makeenv();
	setlocale(LC_CTYPE, "");

	if (dashsee[0] != NULL || dashess) {	/* input from  -c or -s? */
		if (*argv != NULL)
			starassign(dollarzero, argv, FALSE);
		if (dashess)
			pushfd(0);
		else
			pushstring(dashsee, TRUE);
	} else if (*argv != NULL) {	/* else from a file? */
		b_dot(--argv);
		rc_exit(getstatus());
	} else {			/* else stdin */
		pushfd(0);
	}
	dasheye = FALSE;
	doit(TRUE);
	rc_exit(getstatus());
	return 0; /* Never really reached. */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r14
movl %edi, %ebp
callq 0x539a
xorps %xmm0, %xmm0
movaps %xmm0, 0x10427(%rip)    # 0x19bb0
movq (%r14), %rax
movq %rax, 0x8(%rsp)
callq 0x30d0
movl %eax, 0x10424(%rip)     # 0x19bc0
movq (%r14), %rax
xorl %ecx, %ecx
cmpb $0x2d, (%rax)
sete %cl
movl %ecx, 0x10417(%rip)     # 0x19bc4
leaq 0x6664(%rip), %r12      # 0xfe18
leaq 0x6605(%rip), %r13      # 0xfdc0
movl $0x1, %ebx
movl %ebp, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x5da0
cmpl $0x62, %eax
jle 0x97f0
addl $-0x63, %eax
cmpl $0x15, %eax
ja 0x97c0
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movl $0x1, 0x103da(%rip)     # 0x19bc8
jmp 0x97c0
cmpl $0x49, %eax
jne 0x9889
movb $0x1, 0x103d0(%rip)     # 0x19bd0
movl $0x0, 0x103ca(%rip)     # 0x19bd4
jmp 0x97c0
movl $0x1, 0x103ae(%rip)     # 0x19bc4
jmp 0x97c0
movl $0x1, 0x103ce(%rip)     # 0x19bf0
jmp 0x97c0
movl $0x1, 0x103ae(%rip)     # 0x19bdc
jmp 0x97c0
movl %ebx, 0x1039e(%rip)     # 0x19bd4
movl %ebx, 0x1039c(%rip)     # 0x19bd8
jmp 0x97c0
movl $0x1, 0x10384(%rip)     # 0x19bcc
jmp 0x97c0
movl $0x1, 0x10391(%rip)     # 0x19be8
jmp 0x97c0
movl $0x1, 0x1037a(%rip)     # 0x19be0
jmp 0x97c0
movl $0x1, 0x1036f(%rip)     # 0x19be4
jmp 0x97c0
movl $0x1, 0x10368(%rip)     # 0x19bec
jmp 0x97c0
cmpl $-0x1, %eax
je 0x98b4
cmpl $0x3f, %eax
jne 0x97c0
movl $0x1, %edi
callq 0x3330
leaq 0x10130(%rip), %rax     # 0x199d8
movq (%rax), %rax
movq %rax, 0x102fe(%rip)     # 0x19bb0
jmp 0x98bb
movq 0x102f5(%rip), %rax     # 0x19bb0
leaq 0xfa36(%rip), %rcx      # 0x192f8
movslq (%rcx), %rcx
leaq (%r14,%rcx,8), %r14
cmpl $0x0, 0x10308(%rip)     # 0x19bd8
jne 0x98fe
testb $0x1, 0x102f7(%rip)     # 0x19bd0
jne 0x98fe
testq %rax, %rax
jne 0x98fe
cmpl $0x0, 0x10301(%rip)     # 0x19be8
je 0x98f8
xorl %edi, %edi
callq 0x3090
movl %eax, 0x102de(%rip)     # 0x19bd4
jmp 0x98fe
cmpq $0x0, (%r14)
je 0x98e9
cmpl $0x0, 0x102db(%rip)     # 0x19be0
jne 0x992e
xorl %edi, %edi
xorl %esi, %esi
callq 0x9b8f
movl $0x1, %edi
movl $0x1, %esi
callq 0x9b8f
movl $0x2, %edi
movl $0x1, %esi
callq 0x9b8f
callq 0xbae7
callq 0x7294
callq 0xa180
leaq 0x5d1d(%rip), %rdi      # 0xf661
leaq 0xacaa(%rip), %rsi      # 0x145f5
leaq 0x64d4(%rip), %r12      # 0xfe26
leaq 0xac9f(%rip), %r13      # 0x145f8
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x9bb7
leaq 0x64b8(%rip), %rdi      # 0xfe28
movq %r13, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x9bb7
leaq 0x5754(%rip), %rdi      # 0xf0d7
leaq 0x64a1(%rip), %rsi      # 0xfe2b
leaq 0x64a9(%rip), %rdx      # 0xfe3a
leaq 0x649d(%rip), %rcx      # 0xfe35
leaq 0x570f(%rip), %r8       # 0xf0ae
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x9bb7
movl 0x10211(%rip), %esi     # 0x19bc0
leaq 0x5ddf(%rip), %rdi      # 0xf795
xorl %eax, %eax
callq 0xb191
leaq 0x5de4(%rip), %rdi      # 0xf7a8
movq %rax, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x9bb7
leaq 0x5dc1(%rip), %rdi      # 0xf798
leaq 0x6465(%rip), %rsi      # 0xfe43
leaq 0x6442(%rip), %rdx      # 0xfe27
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x9bb7
leaq 0x6451(%rip), %rdi      # 0xfe46
movq %r12, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x9bb7
leaq 0x5d97(%rip), %rdi      # 0xf79f
leaq 0x643b(%rip), %rsi      # 0xfe4a
xorl %edx, %edx
xorl %eax, %eax
callq 0x9bb7
movq %r15, %rdi
callq 0x78bc
callq 0x82b7
leaq 0x10(%rsp), %rsi
movq $0x0, (%rsi)
movq 0x8(%rsp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0xcbaf
callq 0x4aec
cmpl $0x0, 0x10178(%rip)     # 0x19bc4
je 0x9acc
leaq 0x5679(%rip), %rdi      # 0xf0ce
callq 0xc9da
movq %rax, %r15
leaq 0x63fa(%rip), %rdi      # 0xfe5e
xorl %esi, %esi
callq 0x6644
movq %r15, %rdi
movq %rax, %rsi
callq 0x66ee
movq (%rax), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0xa08c
cmpl $-0x1, %eax
je 0x9aba
movl %eax, %ebp
movl %eax, %edi
callq 0x82ed
movl 0x1013d(%rip), %ebx     # 0x19bd4
movl $0x0, 0x10133(%rip)     # 0x19bd4
movl $0x1, %edi
callq 0x84c5
movl %ebx, 0x10123(%rip)     # 0x19bd4
movl %ebp, %edi
callq 0x3170
jmp 0x9acc
callq 0x3040
cmpl $0x2, (%rax)
je 0x9acc
movq %r15, %rdi
callq 0xc6dd
callq 0x79c6
movq 0xf510(%rip), %rcx      # 0x18fe8
movq %rax, (%rcx)
leaq 0x6345(%rip), %rsi      # 0xfe27
xorl %edi, %edi
callq 0x32b0
cmpq $0x0, 0x100bf(%rip)     # 0x19bb0
setne %cl
movl 0x100ee(%rip), %eax     # 0x19be8
testl %eax, %eax
setne %dl
orb %cl, %dl
movq (%r14), %rcx
cmpb $0x1, %dl
jne 0x9b38
testq %rcx, %rcx
je 0x9b21
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xcbaf
movl 0x100c7(%rip), %eax     # 0x19be8
testl %eax, %eax
jne 0x9b57
leaq 0x10084(%rip), %rdi     # 0x19bb0
movl $0x1, %esi
callq 0x8388
jmp 0x9b5e
testq %rcx, %rcx
je 0x9b57
addq $-0x8, %r14
movq %r14, %rdi
callq 0x35a9
callq 0xbb95
movl %eax, %edi
callq 0x4eb5
jmp 0x9b5e
xorl %edi, %edi
callq 0x82ed
movl $0x0, 0x10070(%rip)     # 0x19bd8
movl $0x1, %edi
callq 0x84c5
callq 0xbb95
movl %eax, %edi
callq 0x4eb5
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq