// File: /workspace/github_cpp_makefile_star2_O3/hzy1754785321[P]warehouse-manage-system/menu.cpp
// Function: MenuMain::adminLogin()
int MenuMain::adminLogin()
{
		int limit=0,login=2,x;
		Person *lg;
		char passwd[32];
		char name[32];
		cout << "\t\t\t\t\tplease input the username:" ;
		cin >> name;
	//	lg=pp.searchName(name);
		if(strcmp(name,"admin")!=0)
		{
				cout << "username error!" << endl;
				sleep(1);
				return 0;
		}//	lg=pp.searchName(name);
		lg=pp.searchName(name);
		if(lg!=NULL)
				{  
				    lg->readStop();
	        		while(lg->getStop()>0)
					{ 	
						system("clear");
						cout << "\033[31m limit login!" << endl << "\033[31m countdown:" << "\033[37m" << lg->getStop() << endl;
						lg->subStop();
					    lg->writeStop();	
						sleep(1);
						if(lg->getStop()==0)
								return 0;
					}
						while(1)
						{
					        if(limit==3)
							{
									lg->setStop10();
									while(lg->getStop()>0)
									{
											system("clear");
											cout << "\033[31m limit login!" << endl << "\033[31m countdown:" << "\033[37m" << lg->getStop() << endl;
											lg->subStop();
											lg->writeStop();
											sleep(1);
									}
									return 0;
							}
							cout << "\t\t\t\t\tplease input the passwd:\033[08m" ;
							cin >> passwd;
							cout << "\033[28m";
							cout << "\033[37m";
				//			cout << "passwd:" << lg->getPasswd()  << endl;
							if(strcmp(passwd,lg->getPasswd())==0)
							{
									lg->pp=&pp;
									pd.readProduct();
				          		    lg->temp=&pd;
									ps=new Admin(lg);
								//	while(login>=0)
							//		{
							 			if(lg->getTime()!=0)
												cout << "\t\t\t\t\t上次登录时间:" << lg->getTime() << endl;
										else
												cout << "\t\t\t\t\twelcome new user!" << endl;
							//	        if(login==0)
							//			{
								//		    lg->readRecord();
											lg->setTime();
											lg->writeRecord();
							//				cout << "时间已记录!" << endl;
							//			}
										cout << "\t\t\t\t\t当前时间:" << lg->getTime() << "   已记录!" << endl<< endl;;
								//		cout << "当前时间:";
								//		showTime();
										srand((unsigned)time(NULL));
										while(login>0)
										{
												x=rand()%6;
										if(x==0)
										{
											 cout << "\033[1A";
											 cout << "\033[K";
											 cout << "\t\t\t\t\t\033[31m请稍候:" << login << endl;
								    		 login--;
											 sleep(1);
										}
										if(x==1)
										{
											cout << "\033[1A";
											cout << "\033[K";
											cout << "\t\t\t\t\t\033[32m请稍候:" << login << endl;
											sleep(1);
											login--;
										}
										if(x==2)
										{
											cout << "\033[1A";
											cout << "\033[K";
											cout << "\t\t\t\t\t\033[33m请稍候:" << login << endl;
											sleep(1);
											login--;
										}
										if(x==3)
										{
											cout << "\33[1A";
											cout << "\33[K";
											cout << "\t\t\t\t\t\033[34m请稍候:" << login << endl;
											sleep(1);
											login--;
										}
										if(x==4)
										{
											cout << "\33[1A";
											cout << "\33[K";
											cout << "\t\t\t\t\t\033[35m请稍候:" << login << endl;
											sleep(1);
											login--;
										}
										if(x==5)
										{
											cout << "\33[1A";
											cout << "\33[K";
											cout << "\t\t\t\t\t\033[36m请稍候:" << login << endl;
											sleep(1);
											login--;
										}
										}
										cout << "\33[1A";
										cout << "\033[K";
									    cout << "\t\t\t\t\t\033[37m请稍候:" << login << endl;
										sleep(1);
								//		system("clear");
									//	}
									//	cout << "welcome admin login in system" << endl;
										return 1;
							}
				
							else
							{
									cout << "\033[28m";
									cout << "\t\t\t\t\tpasswd error!" << endl;
									limit++;
							}
						}
				}

				
				else
				{
				//		cout << "11111" << endl;
						ps=new Admin;
				//		cout << "333333" << endl;
						ps->pp=&pp;
						ps->pp->push_back(ps);
						pd.readProduct();
						ps->temp=&pd;
						ps->setTime();
						return 1;
				}		
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r13
movq 0xc775(%rip), %rbx      # 0xefd0
leaq 0x887f(%rip), %rsi      # 0xb0e1
pushq $0x1f
popq %rdx
movq %rbx, %rdi
callq 0x2240
movq 0xc76c(%rip), %r15      # 0xefe0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq 0x10(%r15,%rax), %r14
leaq -0x60(%rbp), %rsi
pushq $0x20
popq %rdx
movq %r15, %rdi
callq 0x2330
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r15,%rax)
jne 0x28c5
addq $-0x21, %r14
cmpq $-0x21, %r14
ja 0x28c5
movq 0xc731(%rip), %rcx      # 0xefe0
movq 0xe8(%rcx,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x3106
leaq 0x7b2c(%rip), %rsi      # 0xa3f8
leaq -0x60(%rbp), %rdi
pushq $0x6
popq %rdx
callq 0x2200
testl %eax, %eax
je 0x2930
leaq 0x881e(%rip), %rsi      # 0xb101
pushq $0xf
popq %rdx
movq %rbx, %rdi
callq 0x2240
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
pushq $0x1
popq %rdi
callq 0x2130
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10(%r13), %rdi
leaq -0x60(%rbp), %rsi
movq %rdi, -0x30(%rbp)
callq 0x4562
testq %rax, %rax
je 0x2a41
movq %rax, %r15
movq %r13, -0x38(%rbp)
movq %rax, %rdi
callq 0x3e82
leaq 0x7ea0(%rip), %r12      # 0xa800
pushq $0xa
popq %r13
movq %r15, %rdi
callq 0x34f0
testl %eax, %eax
jle 0x2a80
movq %r12, %rdi
callq 0x2170
movq %rbx, %rdi
leaq 0x878b(%rip), %rsi      # 0xb111
pushq $0x12
popq %rdx
callq 0x2240
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl %r13d, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq %rax, %rdi
leaq 0x8764(%rip), %rsi      # 0xb124
pushq $0x10
popq %rdx
callq 0x2240
movq %r14, %rdi
leaq 0x8763(%rip), %rsi      # 0xb135
pushq $0x5
popq %rdx
callq 0x2240
movq %r15, %rdi
callq 0x34f0
movq %r14, %rdi
movl %eax, %esi
callq 0x2340
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl %r13d, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %r15, %rdi
callq 0x3d6a
movq %r15, %rdi
callq 0x3d82
pushq $0x1
popq %rdi
callq 0x2130
movq %r15, %rdi
callq 0x34f0
testl %eax, %eax
jne 0x2964
jmp 0x291b
movl $0xb8, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
callq 0x574e
movq %r14, 0x40(%r13)
movq -0x30(%rbp), %rdi
movq %rdi, 0xb0(%r14)
movq 0x18(%r13), %rsi
cmpq 0x20(%r13), %rsi
je 0x2d47
movq %r14, (%rsi)
addq $0x8, 0x18(%r13)
jmp 0x2d50
pushq $0x3
popq %r13
movq %rbx, %r12
movq %rbx, %rdi
leaq 0x86aa(%rip), %rsi      # 0xb13b
pushq $0x22
popq %rdx
callq 0x2240
movq 0xc540(%rip), %rbx      # 0xefe0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq 0x10(%rbx,%rax), %r14
movq %rbx, %rdi
leaq -0x80(%rbp), %rsi
pushq $0x20
popq %rdx
callq 0x2330
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%rbx,%rax)
jne 0x2af0
addq $-0x21, %r14
cmpq $-0x21, %r14
ja 0x2af0
movq 0xc506(%rip), %rcx      # 0xefe0
movq 0xe8(%rcx,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x2b8d
movq %r12, %rdi
leaq 0x8664(%rip), %r14      # 0xb15e
movq %r12, %rbx
movq %r14, %rsi
pushq $0x5
popq %r12
movq %r12, %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x861f(%rip), %rsi      # 0xb135
movq %r12, %rdx
callq 0x2240
movq %r15, %rdi
callq 0x34dc
leaq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0x22a0
testl %eax, %eax
je 0x2bbf
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x86f6(%rip), %rsi      # 0xb248
pushq $0x12
popq %rdx
callq 0x2240
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
decl %r13d
jne 0x2a84
jmp 0x2c57
movq (%rdi), %rax
callq *0x48(%rax)
cmpl $-0x1, %eax
jne 0x2af0
movq 0xc43d(%rip), %rcx      # 0xefe0
movq (%rcx), %rax
movq -0x18(%rax), %rax
leaq (%rcx,%rax), %rdi
movl 0x20(%rcx,%rax), %esi
orl $0x2, %esi
callq 0x2310
jmp 0x2af0
movq -0x30(%rbp), %rax
movq %rax, 0xb0(%r15)
movq -0x38(%rbp), %r12
leaq 0x28(%r12), %r14
movq %r14, %rdi
callq 0x7086
movq %r14, 0xa8(%r15)
movl $0xb8, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x581a
movq %r14, 0x40(%r12)
movq %r15, %rdi
callq 0x36f0
testq %rax, %rax
je 0x2d75
movq 0xc3b9(%rip), %r14      # 0xefd0
leaq 0x8546(%rip), %rsi      # 0xb164
pushq $0x18
popq %rdx
movq %r14, %rdi
callq 0x2240
movq %r15, %rdi
callq 0x36f0
testq %rax, %rax
je 0x2d8d
movq %rax, %r12
movq %rax, %rdi
callq 0x20c0
movq 0xc384(%rip), %rdi      # 0xefd0
movq %r12, %rsi
movq %rax, %rdx
jmp 0x2d86
movq %r15, %rdi
callq 0x3d74
movq %r15, %rdi
callq 0x34f0
xorl %r14d, %r14d
testl %eax, %eax
jle 0x291e
pushq $0xa
popq %r13
leaq 0x7b83(%rip), %rdi      # 0xa800
callq 0x2170
movq %rbx, %rdi
leaq 0x8485(%rip), %rsi      # 0xb111
pushq $0x12
popq %rdx
callq 0x2240
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl %r13d, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %rax, %r12
movq %rax, %rdi
leaq 0x845e(%rip), %rsi      # 0xb124
pushq $0x10
popq %rdx
callq 0x2240
movq %r12, %rdi
leaq 0x845d(%rip), %rsi      # 0xb135
pushq $0x5
popq %rdx
callq 0x2240
movq %r15, %rdi
callq 0x34f0
movq %r12, %rdi
movl %eax, %esi
callq 0x2340
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl %r13d, %esi
callq 0x21c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %r15, %rdi
callq 0x3d6a
movq %r15, %rdi
callq 0x3d82
pushq $0x1
popq %rdi
callq 0x2130
movq %r15, %rdi
callq 0x34f0
testl %eax, %eax
jg 0x2c76
jmp 0x291e
leaq 0x40(%r13), %rdx
callq 0x5b3e
leaq 0x28(%r13), %rbx
movq %rbx, %rdi
callq 0x7086
movq 0x40(%r13), %rdi
movq %rbx, 0xa8(%rdi)
callq 0x36aa
pushq $0x1
popq %r14
jmp 0x291e
movq 0xc254(%rip), %rdi      # 0xefd0
leaq 0x83fa(%rip), %rsi      # 0xb17d
pushq $0x16
popq %rdx
callq 0x2240
jmp 0x2da5
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2310
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %r15, %rdi
callq 0x36aa
movq %r15, %rdi
callq 0x4936
leaq 0x83b3(%rip), %rsi      # 0xb194
pushq $0x12
popq %rdx
movq %rbx, %rdi
callq 0x2240
movq %r15, %rdi
callq 0x36f0
testq %rax, %rax
je 0x2e18
movq %rax, %r14
movq %rax, %rdi
callq 0x20c0
movq 0xc1c5(%rip), %rdi      # 0xefd0
movq %r14, %rsi
movq %rax, %rdx
callq 0x2240
jmp 0x2e2f
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x2310
leaq 0x8371(%rip), %rsi      # 0xb1a7
pushq $0xd
popq %rdx
movq %rbx, %rdi
callq 0x2240
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
pushq $0xa
popq %r15
movl %r15d, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl %r15d, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
xorl %edi, %edi
callq 0x2190
movl %eax, %edi
callq 0x21b0
pushq $0x2
popq %r12
leaq 0x7869(%rip), %r13      # 0xa714
pushq $0x1
popq %r14
callq 0x2090
cltd
pushq $0x6
popq %rcx
idivl %ecx
cmpl $0x5, %edx
ja 0x3080
movslq (%r13,%rdx,4), %rax
addq %r13, %rax
jmpq *%rax
movq %rbx, %rdi
leaq 0x7447(%rip), %rsi      # 0xa31e
pushq $0x4
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x743a(%rip), %rsi      # 0xa323
pushq $0x3
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x82ba(%rip), %rsi      # 0xb1b5
pushq $0x14
popq %rdx
callq 0x2240
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2340
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
pushq $0xa
popq %rsi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
decl %r12d
movl %r14d, %edi
callq 0x2130
jmp 0x3080
movq %rbx, %rdi
leaq 0x73ce(%rip), %rsi      # 0xa31e
pushq $0x4
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x73c1(%rip), %rsi      # 0xa323
pushq $0x3
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x8295(%rip), %rsi      # 0xb209
jmp 0x303a
movq %rbx, %rdi
leaq 0x739b(%rip), %rsi      # 0xa31e
pushq $0x4
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x738e(%rip), %rsi      # 0xa323
pushq $0x3
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x8238(%rip), %rsi      # 0xb1df
jmp 0x303a
movq %rbx, %rdi
leaq 0x7368(%rip), %rsi      # 0xa31e
pushq $0x4
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x735b(%rip), %rsi      # 0xa323
pushq $0x3
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x821a(%rip), %rsi      # 0xb1f4
jmp 0x303a
movq %rbx, %rdi
leaq 0x7338(%rip), %rsi      # 0xa31e
pushq $0x4
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x732b(%rip), %rsi      # 0xa323
pushq $0x3
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x81c0(%rip), %rsi      # 0xb1ca
jmp 0x303a
movq %rbx, %rdi
leaq 0x7308(%rip), %rsi      # 0xa31e
pushq $0x4
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x72fb(%rip), %rsi      # 0xa323
pushq $0x3
popq %rdx
callq 0x2240
movq %rbx, %rdi
leaq 0x81e4(%rip), %rsi      # 0xb21e
pushq $0x14
popq %rdx
callq 0x2240
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2340
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
pushq $0xa
popq %rsi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movl %r14d, %edi
callq 0x2130
decl %r12d
testl %r12d, %r12d
jg 0x2eaf
movq 0xbf40(%rip), %rbx      # 0xefd0
leaq 0x7287(%rip), %rsi      # 0xa31e
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0x2240
leaq 0x727a(%rip), %rsi      # 0xa323
pushq $0x3
popq %rdx
movq %rbx, %rdi
callq 0x2240
leaq 0x8178(%rip), %rsi      # 0xb233
pushq $0x14
popq %rdx
movq %rbx, %rdi
callq 0x2240
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2340
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
pushq $0xa
popq %rsi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movl %r14d, %edi
callq 0x2130
jmp 0x291e
movq (%rdi), %rax
callq *0x48(%rax)
cmpl $-0x1, %eax
jne 0x28c5
movq 0xbec4(%rip), %rcx      # 0xefe0
movq (%rcx), %rax
movq -0x18(%rax), %rax
leaq (%rcx,%rax), %rdi
movl 0x20(%rcx,%rax), %esi
orl $0x2, %esi
callq 0x2310
jmp 0x28c5
jmp 0x313a
movq %rax, %rbx
movl $0xb8, %esi
movq %r14, %rdi
callq 0x21f0
movq %rbx, %rdi
callq 0x2350