// File: /workspace/github_c_makefile_star2_O3/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 $0x38, %rsp
movq %rsi, -0x58(%rbp)
movb 0xced6a(%rip), %r14b    # 0x4d23b0
andb $-0x10, %r14b
movb %r14b, 0xced5f(%rip)    # 0x4d23b0
movl $0x0, 0xced59(%rip)     # 0x4d23b4
movl %edi, -0x3c(%rbp)
cmpl $0x2, %edi
jl 0x403962
movl $0x1, %r15d
movq $0x0, -0x38(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x50(%rbp)
leal 0x1(%r15), %ebx
movslq %r15d, %rax
movq -0x58(%rbp), %rcx
movq (%rcx,%rax,8), %r12
movb (%r12), %r13b
cmpb $0x2d, %r13b
jne 0x403705
cmpb $0x61, 0x1(%r12)
jne 0x4036ba
cmpb $0x0, 0x2(%r12)
je 0x40376c
movq %r12, %rdi
leaq 0x9bd81(%rip), %rsi     # 0x49f445
callq 0x4010b0
testl %eax, %eax
je 0x40376c
cmpb $0x62, 0x1(%r12)
jne 0x403797
cmpb $0x0, 0x2(%r12)
je 0x403804
movq %r12, %rdi
leaq 0x9bb53(%rip), %rsi     # 0x49f246
callq 0x4010b0
testl %eax, %eax
jne 0x4037b4
jmp 0x403804
movq %r12, %rdi
leaq 0x9bd36(%rip), %rsi     # 0x49f445
callq 0x4010b0
testl %eax, %eax
je 0x40376c
movq %r12, %rdi
leaq 0x9bb24(%rip), %rsi     # 0x49f246
callq 0x4010b0
testl %eax, %eax
je 0x403804
movq %r12, %rdi
leaq 0x9bb37(%rip), %rsi     # 0x49f270
callq 0x4010b0
testl %eax, %eax
je 0x403962
cmpb $0x2d, %r13b
je 0x4037df
movq %r12, %rdi
leaq 0x9bb31(%rip), %rsi     # 0x49f28b
callq 0x4010b0
testl %eax, %eax
jne 0x403851
jmp 0x40384b
cmpl -0x3c(%rbp), %ebx
jge 0x40397a
addl $0x2, %r15d
movslq %ebx, %rax
movq -0x58(%rbp), %rcx
movq (%rcx,%rax,8), %rdi
callq 0x40c280
movl %eax, 0xcec25(%rip)     # 0x4d23b4
movl %r15d, %ebx
jmp 0x4038c4
movq %r12, %rdi
leaq 0x9baa5(%rip), %rsi     # 0x49f246
callq 0x4010b0
testl %eax, %eax
je 0x403804
cmpb $0x2d, %r13b
jne 0x40372f
cmpb $0x68, 0x1(%r12)
jne 0x4037c8
cmpb $0x0, 0x2(%r12)
je 0x403962
movq %r12, %rdi
leaq 0x9ba9e(%rip), %rsi     # 0x49f270
callq 0x4010b0
testl %eax, %eax
je 0x403962
cmpb $0x6e, 0x1(%r12)
jne 0x40380d
cmpb $0x0, 0x2(%r12)
je 0x40384b
movq %r12, %rdi
leaq 0x9ba92(%rip), %rsi     # 0x49f28b
callq 0x4010b0
testl %eax, %eax
jne 0x403826
jmp 0x40384b
orb $0x1, %r14b
jmp 0x4038bd
movq %r12, %rdi
leaq 0x9ba74(%rip), %rsi     # 0x49f28b
callq 0x4010b0
testl %eax, %eax
je 0x40384b
cmpb $0x2d, %r13b
jne 0x403851
cmpb $0x7a, 0x1(%r12)
jne 0x403836
cmpb $0x0, 0x2(%r12)
je 0x4038b3
movq %r12, %rdi
leaq 0x9ba7a(%rip), %rsi     # 0x49f2ba
callq 0x4010b0
testl %eax, %eax
jne 0x40386a
jmp 0x4038b3
orb $0x2, %r14b
jmp 0x4038bd
movq %r12, %rdi
leaq 0x9ba5f(%rip), %rsi     # 0x49f2ba
callq 0x4010b0
testl %eax, %eax
je 0x4038b3
cmpb $0x2d, %r13b
jne 0x40387a
cmpb $0x6d, 0x1(%r12)
jne 0x40387a
cmpb $0x0, 0x2(%r12)
je 0x4038b9
movq %r12, %rdi
leaq 0x9bbcd(%rip), %rsi     # 0x49f451
callq 0x4010b0
testl %eax, %eax
je 0x4038b9
cmpq $0x0, -0x50(%rbp)
je 0x4038d2
cmpq $0x0, -0x30(%rbp)
je 0x4038d8
cmpq $0x0, -0x48(%rbp)
je 0x4038de
movq -0x38(%rbp), %rax
testq %rax, %rax
cmoveq %r12, %rax
movq %rax, -0x38(%rbp)
jmp 0x4038c4
orb $0x4, %r14b
jmp 0x4038bd
orb $0x8, %r14b
movb %r14b, 0xceaec(%rip)    # 0x4d23b0
movl %ebx, %r15d
cmpl -0x3c(%rbp), %ebx
jl 0x40368d
jmp 0x4038e4
movq %r12, -0x50(%rbp)
jmp 0x4038c4
movq %r12, -0x30(%rbp)
jmp 0x4038c4
movq %r12, -0x48(%rbp)
jmp 0x4038c4
cmpq $0x0, -0x30(%rbp)
je 0x403962
leaq 0x9e8e7(%rip), %rsi     # 0x4a21d9
movq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0x4010b0
testl %eax, %eax
je 0x40398d
leaq 0x9bb4b(%rip), %rsi     # 0x49f458
movq %r14, %rdi
callq 0x4010b0
testl %eax, %eax
je 0x403998
leaq 0x9bb3c(%rip), %rsi     # 0x49f45c
movq %r14, %rdi
callq 0x4010b0
testl %eax, %eax
je 0x4039a3
movq -0x48(%rbp), %rbx
testq %rbx, %rbx
je 0x403962
leaq 0x9bb24(%rip), %rsi     # 0x49f460
movq %r14, %rdi
callq 0x4010b0
testl %eax, %eax
je 0x4039bb
cmpq $0x0, -0x38(%rbp)
je 0x403962
leaq 0x9bb0e(%rip), %rsi     # 0x49f464
movq %r14, %rdi
callq 0x4010b0
testl %eax, %eax
je 0x4039da
callq 0x4034a8
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9bc75(%rip), %rdi     # 0x49f5f6
callq 0x414f20
movl $0x1, %ebx
jmp 0x403969
movq -0x30(%rbp), %rdi
callq 0x40327e
jmp 0x403967
movq -0x30(%rbp), %rdi
callq 0x4031d7
jmp 0x403967
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x4039c9
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x40333b
jmp 0x403967
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
callq 0x4032da
jmp 0x403967
xorl %ebx, %ebx
movq -0x30(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x40333b
jmp 0x403969
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
movq -0x38(%rbp), %rdx
callq 0x40342f
jmp 0x403967
nop