// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: main
int main(int ac,char* av[]) {
	char* com = NULL;
	char* fname1 = NULL;
	char* fname2 = NULL;
	char* fname3 = NULL;
	opt.isBasic = 0;
	opt.headLess = 0;
	opt.asHobeta = 0;
	opt.mono = 0;
	opt.aStart = 0;
	int i = 1;
	char* parg;
	while (i < ac) {
		parg = av[i++];
		if ((strcmp(parg,"-a") == 0) || (strcmp(parg,"--autostart") == 0)) {
			if (i < ac) {
				opt.aStart = atoi(av[i++]);
			} else {
				printf("Invalid argument count\n");
				return 1;
			}
		} else if ((strcmp(parg,"-b") && strcmp(parg,"--basic")) == 0) {
			opt.isBasic = 1;
		} else if ((strcmp(parg,"-h") && strcmp(parg,"--help")) == 0) {
			help();
			return 0;
		} else if ((strcmp(parg,"-n") && strcmp(parg,"--no-head")) == 0) {
			opt.headLess = 1;
		} else if ((strcmp(parg,"-z") && strcmp(parg,"--hobeta")) == 0) {
			opt.asHobeta = 1;
		} else if ((strcmp(parg,"-m") && strcmp(parg,"--mono")) == 0) {
			opt.mono = 1;
		} else {
			if (!com) com = parg;
			else if (!fname1) fname1 = parg;
			else if (!fname2) fname2 = parg;
			else if (!fname3) fname3 = parg;
		}
	}
	if (!fname1) help();
	else if (strcmp(com,"list") == 0) list(fname1);
	else if (strcmp(com,"new") == 0) create(fname1);
	else if (strcmp(com,"pop") == 0) {
		if (fname2 == NULL) {
			pop(fname1, NULL, NULL);
		} else {
			pop(fname2, fname1, fname3);
		}
	}
	else if (!fname2) help();
	else if (strcmp(com,"add") == 0) push(fname2, fname1);
	else if (!fname3) help();
	else if (strcmp(com,"rename") == 0) renam(fname1, fname2, fname3);
	else help();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, -0x50(%rbp)
movb 0xceeba(%rip), %al      # 0x4d23d0
andb $-0x10, %al
movb %al, -0x29(%rbp)
movb %al, 0xceeaf(%rip)      # 0x4d23d0
andl $0x0, 0xceeac(%rip)     # 0x4d23d4
movl %edi, -0x44(%rbp)
pushq $0x1
popq %r15
xorl %eax, %eax
xorl %ecx, %ecx
xorl %ebx, %ebx
movq $0x0, -0x40(%rbp)
movq %rcx, %r14
movq %rax, %r13
cmpl -0x44(%rbp), %r15d
jge 0x403759
movq %rbx, -0x38(%rbp)
leal 0x1(%r15), %eax
movl %eax, -0x30(%rbp)
movslq %r15d, %rax
movq -0x50(%rbp), %rcx
movq (%rcx,%rax,8), %r12
movb (%r12), %bl
cmpb $0x2d, %bl
jne 0x403580
cmpb $0x61, 0x1(%r12)
jne 0x403580
cmpb $0x0, 0x2(%r12)
je 0x4036ed
movq %r12, %rdi
leaq 0x9bebb(%rip), %rsi     # 0x49f445
callq 0x4010b8
testl %eax, %eax
je 0x4036ed
cmpb $0x2d, %bl
jne 0x4035b0
cmpb $0x62, 0x1(%r12)
jne 0x4035b0
cmpb $0x0, 0x2(%r12)
je 0x403721
movq %r12, %rdi
leaq 0x9bc8c(%rip), %rsi     # 0x49f246
callq 0x4010b8
testl %eax, %eax
je 0x403721
cmpb $0x2d, %bl
jne 0x4035e0
cmpb $0x68, 0x1(%r12)
jne 0x4035e0
cmpb $0x0, 0x2(%r12)
je 0x4037c9
movq %r12, %rdi
leaq 0x9bc86(%rip), %rsi     # 0x49f270
callq 0x4010b8
testl %eax, %eax
je 0x4037c9
cmpb $0x2d, %bl
jne 0x403610
cmpb $0x6e, 0x1(%r12)
jne 0x403610
cmpb $0x0, 0x2(%r12)
je 0x403728
movq %r12, %rdi
leaq 0x9bc71(%rip), %rsi     # 0x49f28b
callq 0x4010b8
testl %eax, %eax
je 0x403728
cmpb $0x2d, %bl
jne 0x403640
cmpb $0x7a, 0x1(%r12)
jne 0x403640
cmpb $0x0, 0x2(%r12)
je 0x40372f
movq %r12, %rdi
leaq 0x9bc70(%rip), %rsi     # 0x49f2ba
callq 0x4010b8
testl %eax, %eax
je 0x40372f
cmpb $0x2d, %bl
jne 0x403670
cmpb $0x6d, 0x1(%r12)
jne 0x403670
cmpb $0x0, 0x2(%r12)
je 0x403736
movq %r12, %rdi
leaq 0x9bdd7(%rip), %rsi     # 0x49f451
callq 0x4010b8
testl %eax, %eax
je 0x403736
movq %r12, %rax
movq %r14, %rcx
movq -0x38(%rbp), %rsi
movq %rsi, %rbx
movl -0x30(%rbp), %edi
movl %edi, %r15d
testq %r13, %r13
je 0x40353d
movq %r13, %rax
movq %r12, %rcx
movq %rsi, %rbx
movl %edi, %r15d
testq %r14, %r14
je 0x40353d
movq %r13, %rax
movq %r14, %rcx
movq %r12, %rbx
movl %edi, %r15d
testq %rsi, %rsi
je 0x40353d
movq -0x40(%rbp), %rax
testq %rax, %rax
cmoveq %r12, %rax
movq %rax, -0x40(%rbp)
movq %r13, %rax
movq %r14, %rcx
movq %rsi, %rbx
movl %edi, %r15d
jmp 0x40353d
movl -0x30(%rbp), %eax
cmpl -0x44(%rbp), %eax
jge 0x4037d0
addl $0x2, %r15d
cltq
movq -0x50(%rbp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x40c0e0
movl %eax, 0xcecc2(%rip)     # 0x4d23d4
movq %r13, %rax
movq %r14, %rcx
movq -0x38(%rbp), %rbx
jmp 0x40353d
movb -0x29(%rbp), %al
orb $0x1, %al
jmp 0x40373b
movb -0x29(%rbp), %al
orb $0x2, %al
jmp 0x40373b
movb -0x29(%rbp), %al
orb $0x4, %al
jmp 0x40373b
movb -0x29(%rbp), %al
orb $0x8, %al
movb %al, -0x29(%rbp)
movb %al, 0xcec8c(%rip)      # 0x4d23d0
movq %r13, %rax
movq %r14, %rcx
movq -0x38(%rbp), %rbx
movl -0x30(%rbp), %esi
movl %esi, %r15d
jmp 0x40353d
testq %r14, %r14
je 0x4037c9
leaq 0x9ea74(%rip), %rsi     # 0x4a21d9
movq %r13, %rdi
callq 0x4010b8
testl %eax, %eax
je 0x4037e1
leaq 0x9bce0(%rip), %rsi     # 0x49f458
movq %r13, %rdi
callq 0x4010b8
testl %eax, %eax
je 0x4037eb
leaq 0x9bcd1(%rip), %rsi     # 0x49f45c
movq %r13, %rdi
callq 0x4010b8
testl %eax, %eax
je 0x4037f5
testq %rbx, %rbx
je 0x4037c9
leaq 0x9bcbd(%rip), %rsi     # 0x49f460
movq %r13, %rdi
callq 0x4010b8
testl %eax, %eax
je 0x40380b
cmpq $0x0, -0x40(%rbp)
je 0x4037c9
leaq 0x9bca7(%rip), %rsi     # 0x49f464
movq %r13, %rdi
callq 0x4010b8
testl %eax, %eax
je 0x403828
callq 0x40338c
jmp 0x403837
leaq 0x9be1f(%rip), %rdi     # 0x49f5f6
callq 0x414d80
pushq $0x1
popq %rbx
jmp 0x403839
movq %r14, %rdi
callq 0x403164
jmp 0x403837
movq %r14, %rdi
callq 0x4030e9
jmp 0x403837
testq %rbx, %rbx
je 0x403818
movq %rbx, %rdi
movq %r14, %rsi
movq -0x40(%rbp), %rdx
callq 0x403221
jmp 0x403837
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4031c0
jmp 0x403837
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x403221
jmp 0x403839
movq %r14, %rdi
movq %rbx, %rsi
movq -0x40(%rbp), %rdx
callq 0x403313
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopw (%rax,%rax)