// File: /workspace/github_c_makefile_star2_O0/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
subq $0x50, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movb 0xce384(%rip), %al      # 0x4d23b0
andb $-0x2, %al
orb $0x0, %al
movb %al, 0xce37a(%rip)      # 0x4d23b0
movb 0xce374(%rip), %al      # 0x4d23b0
andb $-0x3, %al
orb $0x0, %al
movb %al, 0xce36a(%rip)      # 0x4d23b0
movb 0xce364(%rip), %al      # 0x4d23b0
andb $-0x5, %al
orb $0x0, %al
movb %al, 0xce35a(%rip)      # 0x4d23b0
movb 0xce354(%rip), %al      # 0x4d23b0
andb $-0x9, %al
orb $0x0, %al
movb %al, 0xce34a(%rip)      # 0x4d23b0
movl $0x0, 0xce344(%rip)     # 0x4d23b4
movl $0x1, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x404316
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x34(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
leaq 0x9b503(%rip), %rsi     # 0x49f5ab
callq 0x4010b0
cmpl $0x0, %eax
je 0x4040c7
movq -0x40(%rbp), %rdi
leaq 0x9b4f1(%rip), %rsi     # 0x49f5ae
callq 0x4010b0
cmpl $0x0, %eax
jne 0x404111
movl -0x34(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x4040f2
movq -0x10(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x34(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x40ce90
movl %eax, 0xce2c4(%rip)     # 0x4d23b4
jmp 0x40410c
leaq 0x9b4c1(%rip), %rdi     # 0x49f5ba
movb $0x0, %al
callq 0x40eab0
movl $0x1, -0x4(%rbp)
jmp 0x404430
jmp 0x404311
movq -0x40(%rbp), %rdi
leaq 0x9b4b6(%rip), %rsi     # 0x49f5d2
callq 0x4010b0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x41(%rbp)
je 0x404146
movq -0x40(%rbp), %rdi
leaq 0x9b262(%rip), %rsi     # 0x49f39a
callq 0x4010b0
cmpl $0x0, %eax
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x404168
movb 0xce257(%rip), %al      # 0x4d23b0
andb $-0x2, %al
orb $0x1, %al
movb %al, 0xce24d(%rip)      # 0x4d23b0
jmp 0x40430f
movq -0x40(%rbp), %rdi
leaq 0x9b462(%rip), %rsi     # 0x49f5d5
callq 0x4010b0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x42(%rbp)
je 0x40419d
movq -0x40(%rbp), %rdi
leaq 0x9b235(%rip), %rsi     # 0x49f3c4
callq 0x4010b0
cmpl $0x0, %eax
setne %al
movb %al, -0x42(%rbp)
movb -0x42(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4041bb
callq 0x403e40
movl $0x0, -0x4(%rbp)
jmp 0x404430
movq -0x40(%rbp), %rdi
leaq 0x9b412(%rip), %rsi     # 0x49f5d8
callq 0x4010b0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x43(%rbp)
je 0x4041f0
movq -0x40(%rbp), %rdi
leaq 0x9b1fd(%rip), %rsi     # 0x49f3df
callq 0x4010b0
cmpl $0x0, %eax
setne %al
movb %al, -0x43(%rbp)
movb -0x43(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x404212
movb 0xce1ad(%rip), %al      # 0x4d23b0
andb $-0x3, %al
orb $0x2, %al
movb %al, 0xce1a3(%rip)      # 0x4d23b0
jmp 0x40430b
movq -0x40(%rbp), %rdi
leaq 0x9b3be(%rip), %rsi     # 0x49f5db
callq 0x4010b0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x44(%rbp)
je 0x404247
movq -0x40(%rbp), %rdi
leaq 0x9b1d5(%rip), %rsi     # 0x49f40e
callq 0x4010b0
cmpl $0x0, %eax
setne %al
movb %al, -0x44(%rbp)
movb -0x44(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x404269
movb 0xce156(%rip), %al      # 0x4d23b0
andb $-0x5, %al
orb $0x4, %al
movb %al, 0xce14c(%rip)      # 0x4d23b0
jmp 0x404309
movq -0x40(%rbp), %rdi
leaq 0x9b36a(%rip), %rsi     # 0x49f5de
callq 0x4010b0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x45(%rbp)
je 0x40429e
movq -0x40(%rbp), %rdi
leaq 0x9b351(%rip), %rsi     # 0x49f5e1
callq 0x4010b0
cmpl $0x0, %eax
setne %al
movb %al, -0x45(%rbp)
movb -0x45(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x4042bd
movb 0xce0ff(%rip), %al      # 0x4d23b0
andb $-0x9, %al
orb $0x8, %al
movb %al, 0xce0f5(%rip)      # 0x4d23b0
jmp 0x404307
cmpq $0x0, -0x18(%rbp)
jne 0x4042ce
movq -0x40(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x404305
cmpq $0x0, -0x20(%rbp)
jne 0x4042df
movq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x404303
cmpq $0x0, -0x28(%rbp)
jne 0x4042f0
movq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
jmp 0x404301
cmpq $0x0, -0x30(%rbp)
jne 0x4042ff
movq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x404301
jmp 0x404303
jmp 0x404305
jmp 0x404307
jmp 0x404309
jmp 0x40430b
jmp 0x40430d
jmp 0x40430f
jmp 0x404311
jmp 0x404077
cmpq $0x0, -0x20(%rbp)
jne 0x404327
callq 0x403e40
jmp 0x404429
movq -0x18(%rbp), %rdi
leaq 0x9dea7(%rip), %rsi     # 0x4a21d9
callq 0x4010b0
cmpl $0x0, %eax
jne 0x40434a
movq -0x20(%rbp), %rdi
callq 0x403b50
jmp 0x404427
movq -0x18(%rbp), %rdi
leaq 0x9b293(%rip), %rsi     # 0x49f5e8
callq 0x4010b0
cmpl $0x0, %eax
jne 0x40436d
movq -0x20(%rbp), %rdi
callq 0x403ac0
jmp 0x404425
movq -0x18(%rbp), %rdi
leaq 0x9b274(%rip), %rsi     # 0x49f5ec
callq 0x4010b0
cmpl $0x0, %eax
jne 0x4043ae
cmpq $0x0, -0x28(%rbp)
jne 0x40439b
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x403c40
jmp 0x4043ac
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x403c40
jmp 0x404423
cmpq $0x0, -0x28(%rbp)
jne 0x4043bc
callq 0x403e40
jmp 0x404421
movq -0x18(%rbp), %rdi
leaq 0x9b229(%rip), %rsi     # 0x49f5f0
callq 0x4010b0
cmpl $0x0, %eax
jne 0x4043e0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x403bc0
jmp 0x40441f
cmpq $0x0, -0x30(%rbp)
jne 0x4043ee
callq 0x403e40
jmp 0x40441d
movq -0x18(%rbp), %rdi
leaq 0x9b1fb(%rip), %rsi     # 0x49f5f4
callq 0x4010b0
cmpl $0x0, %eax
jne 0x404416
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x403db0
jmp 0x40441b
callq 0x403e40
jmp 0x40441d
jmp 0x40441f
jmp 0x404421
jmp 0x404423
jmp 0x404425
jmp 0x404427
jmp 0x404429
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)