// File: /workspace/github_c_makefile_star2_O1/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
movb 0xced31(%rip), %al      # 0x4d23b0
andb $-0x10, %al
movb %al, 0xced29(%rip)      # 0x4d23b0
movl $0x0, 0xced23(%rip)     # 0x4d23b4
cmpl $0x2, %edi
jl 0x40386a
movq %rsi, %r13
movl %edi, %ebx
movb %al, -0x29(%rbp)
movl $0x1, %r14d
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
leal 0x1(%r14), %r15d
movslq %r14d, %rax
movq (%r13,%rax,8), %r12
movq %r12, %rdi
leaq 0x9bd67(%rip), %rsi     # 0x49f445
callq 0x4010b0
testl %eax, %eax
je 0x403802
movq %r12, %rdi
leaq 0x9bd53(%rip), %rsi     # 0x49f448
callq 0x4010b0
testl %eax, %eax
je 0x403802
movq %r12, %rdi
leaq 0x9bd48(%rip), %rsi     # 0x49f454
callq 0x4010b0
testl %eax, %eax
je 0x403827
movq %r12, %rdi
leaq 0x9bb23(%rip), %rsi     # 0x49f246
callq 0x4010b0
testl %eax, %eax
je 0x403827
movq %r12, %rdi
leaq 0x9bd1d(%rip), %rsi     # 0x49f457
callq 0x4010b0
testl %eax, %eax
je 0x403906
movq %r12, %rdi
leaq 0x9bb1f(%rip), %rsi     # 0x49f270
callq 0x4010b0
testl %eax, %eax
je 0x403906
movq %r12, %rdi
leaq 0x9bcf2(%rip), %rsi     # 0x49f45a
callq 0x4010b0
testl %eax, %eax
je 0x40382e
movq %r12, %rdi
leaq 0x9bb0c(%rip), %rsi     # 0x49f28b
callq 0x4010b0
testl %eax, %eax
je 0x40382e
movq %r12, %rdi
leaq 0x9bcc7(%rip), %rsi     # 0x49f45d
callq 0x4010b0
testl %eax, %eax
je 0x403835
movq %r12, %rdi
leaq 0x9bb0d(%rip), %rsi     # 0x49f2ba
callq 0x4010b0
testl %eax, %eax
je 0x403835
movq %r12, %rdi
leaq 0x9bca0(%rip), %rsi     # 0x49f460
callq 0x4010b0
testl %eax, %eax
je 0x40383c
movq %r12, %rdi
leaq 0x9bc90(%rip), %rsi     # 0x49f463
callq 0x4010b0
testl %eax, %eax
je 0x40383c
cmpq $0x0, -0x48(%rbp)
je 0x403858
cmpq $0x0, -0x50(%rbp)
je 0x40385e
cmpq $0x0, -0x40(%rbp)
je 0x403864
movq -0x38(%rbp), %rax
testq %rax, %rax
cmoveq %r12, %rax
movq %rax, -0x38(%rbp)
jmp 0x40384a
cmpl %ebx, %r15d
jge 0x403917
addl $0x2, %r14d
movslq %r15d, %rax
movq (%r13,%rax,8), %rdi
callq 0x40c220
movl %eax, 0xceb92(%rip)     # 0x4d23b4
movl %r14d, %r15d
jmp 0x40384a
movb -0x29(%rbp), %al
orb $0x1, %al
jmp 0x403841
movb -0x29(%rbp), %al
orb $0x2, %al
jmp 0x403841
movb -0x29(%rbp), %al
orb $0x4, %al
jmp 0x403841
movb -0x29(%rbp), %al
orb $0x8, %al
movb %al, -0x29(%rbp)
movb %al, 0xceb66(%rip)      # 0x4d23b0
movl %r15d, %r14d
cmpl %ebx, %r15d
jl 0x4036c8
jmp 0x40388a
movq %r12, -0x48(%rbp)
jmp 0x40384a
movq %r12, -0x50(%rbp)
jmp 0x40384a
movq %r12, -0x40(%rbp)
jmp 0x40384a
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x50(%rbp), %r14
testq %r14, %r14
je 0x403906
leaq 0x9e93f(%rip), %rsi     # 0x4a21d9
movq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0x4010b0
testl %eax, %eax
je 0x40390d
leaq 0x9bbb9(%rip), %rsi     # 0x49f46a
movq %r15, %rdi
callq 0x4010b0
testl %eax, %eax
je 0x40392a
leaq 0x9bbaa(%rip), %rsi     # 0x49f46e
movq %r15, %rdi
callq 0x4010b0
testl %eax, %eax
je 0x403934
movq -0x40(%rbp), %rbx
testq %rbx, %rbx
je 0x403906
leaq 0x9bb92(%rip), %rsi     # 0x49f472
movq %r15, %rdi
callq 0x4010b0
testl %eax, %eax
je 0x40394b
cmpq $0x0, -0x38(%rbp)
je 0x403906
leaq 0x9bb7c(%rip), %rsi     # 0x49f476
movq %r15, %rdi
callq 0x4010b0
testl %eax, %eax
je 0x403968
callq 0x4034e6
jmp 0x403977
movq %r14, %rdi
callq 0x4032bc
jmp 0x403977
leaq 0x9bcea(%rip), %rdi     # 0x49f608
callq 0x414ec0
movl $0x1, %ebx
jmp 0x403979
movq %r14, %rdi
callq 0x403215
jmp 0x403977
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x403958
movq %r14, %rsi
movq -0x38(%rbp), %rdx
callq 0x403379
jmp 0x403977
movq %rbx, %rdi
movq %r14, %rsi
callq 0x403318
jmp 0x403977
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x403379
jmp 0x403979
movq %r14, %rdi
movq %rbx, %rsi
movq -0x38(%rbp), %rdx
callq 0x40346d
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)