// File: /workspace/github_cpp_makefile_star2_O2/hzy1754785321[P]warehouse-manage-system/menu.cpp
// Function: MenuMain::login()
Person* MenuMain::login()
{
		int id,limit=0,login=2,x,i=0;
		char passwd[32];
		Person* lg;
		cout << "\t\t\t\t\tplease input your username:" ;
		cin >> id;
		lg=pp.searchNumber(id);
		if(lg!=NULL)
		{
			//	    lg->pp=&pp;
			//		pp.readPeople();
				    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)
						{
								lg=NULL;
								return lg;
						}
					}
				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);
									}
									lg=NULL;
									return lg;
						}

					cout << "\t\t\t\t\tplease input your passwd:\033[08m" ;
					cin >> passwd;
					cout << "\033[28m" ;
					cout << "\033[37m" ;
		//			cout << "3333333" << endl;
					if(strcmp(passwd,lg->getPasswd())==0)
					{
							cout << "\033[28m";
							lg->pp=&pp;
							pd.readProduct();
							lg->temp=&pd;
								//	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->setTime();
											lg->writeRecord();
									//		cout << "时间已记录!" << endl;
									//	}
										cout << "\t\t\t\t\t当前时间:" << lg->getTime() << "   已记录!" << endl << endl;
									//	cout << "当前时间:";
									//	showTime();
									//	while(login>0)
									//	{
										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);
									//			cout << "\033[1A";
									//			cout << "\033[K";
									//			cout << "\t\t\t\t\t请稍候:" << login << endl;
									//			login--;
									//			sleep(1);
								//		}
									//	system("clear");
						//	if(lg->getTime()!=0)
							   //  	cout << "上次登录时间:" << lg->getTime() << endl;
					//		else
					//				cout << "welcome new user!" << endl;
					//		lg->setTime();
					//		cout << "当前时间:" << lg->getTime() << "   已记录!" << endl;				
					//		sleep(5);
							return lg;
					}
					else
					{
							cout << "\t\t\t\t\t\033[28mpasswd error!" << endl;
							limit++;
					}
				}
		}
		else
		{
				cout << "username is NULL!" << endl;
				sleep(1);
				return lg;
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r14
movq 0x6a59(%rip), %rdi      # 0xcfd0
leaq 0x2cf9(%rip), %rsi      # 0x9277
callq 0x21c0
movq 0x6a56(%rip), %rdi      # 0xcfe0
leaq -0x3c(%rbp), %rbx
movq %rbx, %rsi
callq 0x2100
leaq 0x10(%r14), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3232
testq %rax, %rax
je 0x666c
movq %rax, %rbx
movq %r15, -0x30(%rbp)
movq %r14, -0x38(%rbp)
movq %rax, %rdi
callq 0x2eca
leaq 0x2b78(%rip), %r14      # 0x9140
leaq 0x2b82(%rip), %r12      # 0x9151
pushq $0x1
popq %r13
movq %rbx, %rdi
callq 0x26a8
testl %eax, %eax
jle 0x6686
leaq 0x2232(%rip), %rdi      # 0x881c
callq 0x2170
movq 0x69da(%rip), %rdi      # 0xcfd0
leaq 0x2b30(%rip), %rsi      # 0x912d
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21c0
movq %rax, %rdi
movq %r12, %rsi
callq 0x21c0
movq %rax, %r15
movq %rbx, %rdi
callq 0x26a8
movq %r15, %rdi
movl %eax, %esi
callq 0x2300
movq %rax, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x2ccc
movq %rbx, %rdi
callq 0x2e20
movl %r13d, %edi
callq 0x2140
movq %rbx, %rdi
callq 0x26a8
testl %eax, %eax
jne 0x65d3
xorl %ebx, %ebx
jmp 0x6a3a
movq 0x695d(%rip), %rdi      # 0xcfd0
leaq 0x2c5a(%rip), %rsi      # 0x92d4
callq 0x21c0
xorl %ebx, %ebx
jmp 0x6a2a
pushq $0x3
popq %r15
movq 0x693f(%rip), %r14      # 0xcfd0
leaq -0x60(%rbp), %r13
leaq 0x2ab5(%rip), %r12      # 0x9151
subl $0x1, %r15d
jb 0x670e
movq %r14, %rdi
leaq 0x2bec(%rip), %rsi      # 0x9298
callq 0x21c0
movq 0x6928(%rip), %rdi      # 0xcfe0
movq %r13, %rsi
callq 0x3fc1
movq %r14, %rdi
leaq 0x2ab0(%rip), %rsi      # 0x917a
callq 0x21c0
movq %r14, %rdi
movq %r12, %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x2694
movq %r13, %rdi
movq %rax, %rsi
callq 0x2280
testl %eax, %eax
je 0x67af
movq %r14, %rdi
leaq 0x2bbd(%rip), %rsi      # 0x92bc
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
jmp 0x669c
movq %rbx, %rdi
callq 0x2cd6
leaq 0x2a23(%rip), %r13      # 0x9140
leaq 0x2a2d(%rip), %r14      # 0x9151
pushq $0x1
popq %r15
movq %rbx, %rdi
callq 0x26a8
testl %eax, %eax
jle 0x6665
leaq 0x20dd(%rip), %rdi      # 0x881c
callq 0x2170
movq 0x6885(%rip), %rdi      # 0xcfd0
leaq 0x29db(%rip), %rsi      # 0x912d
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movq %rax, %rdi
movq %r14, %rsi
callq 0x21c0
movq %rax, %r12
movq %rbx, %rdi
callq 0x26a8
movq %r12, %rdi
movl %eax, %esi
callq 0x2300
movq %rax, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x2ccc
movq %rbx, %rdi
callq 0x2e20
movl %r15d, %edi
callq 0x2140
jmp 0x6728
movq 0x681a(%rip), %rdi      # 0xcfd0
leaq 0x29bd(%rip), %rsi      # 0x917a
callq 0x21c0
movq -0x30(%rbp), %rax
movq %rax, 0xb0(%rbx)
movq -0x38(%rbp), %r14
addq $0x28, %r14
movq %r14, %rdi
callq 0x5346
movq %r14, 0xa8(%rbx)
movq %rbx, %rdi
callq 0x2828
movq 0x67dd(%rip), %rdi      # 0xcfd0
testq %rax, %rax
je 0x6817
leaq 0x2981(%rip), %rsi      # 0x9180
callq 0x21c0
movq %rax, %r14
movq %rbx, %rdi
callq 0x2828
movq %r14, %rdi
movq %rax, %rsi
jmp 0x681e
leaq 0x297b(%rip), %rsi      # 0x9199
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
movq %rbx, %rdi
callq 0x27e4
movq %rbx, %rdi
callq 0x3540
movq 0x678e(%rip), %r14      # 0xcfd0
leaq 0x2967(%rip), %rsi      # 0x91b0
movq %r14, %rdi
callq 0x21c0
movq %rax, %r15
movq %rbx, %rdi
callq 0x2828
movq %r15, %rdi
movq %rax, %rsi
callq 0x21c0
leaq 0x2955(%rip), %rsi      # 0x91c3
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20e0
movq %rax, %rdi
callq 0x20e0
xorl %edi, %edi
callq 0x2190
movl %eax, %edi
callq 0x21b0
pushq $0x2
popq %r15
pushq $0x6
popq %r13
leaq 0x1ebd(%rip), %r12      # 0x8760
testl %r15d, %r15d
jle 0x69eb
callq 0x2080
cltd
idivl %r13d
cmpl $0x5, %edx
ja 0x68a3
movslq (%r12,%rdx,4), %rax
addq %r12, %rax
jmpq *%rax
movq %r14, %rdi
leaq 0x1a3e(%rip), %rsi      # 0x830b
callq 0x21c0
movq %r14, %rdi
leaq 0x1a34(%rip), %rsi      # 0x8310
callq 0x21c0
movq %r14, %rdi
leaq 0x28e6(%rip), %rsi      # 0x91d1
jmp 0x69c3
movq %r14, %rdi
leaq 0x1a11(%rip), %rsi      # 0x830b
callq 0x21c0
movq %r14, %rdi
leaq 0x1a07(%rip), %rsi      # 0x8310
callq 0x21c0
movq %r14, %rdi
leaq 0x290d(%rip), %rsi      # 0x9225
jmp 0x69c3
movq %r14, %rdi
leaq 0x19e4(%rip), %rsi      # 0x830b
callq 0x21c0
movq %r14, %rdi
leaq 0x19da(%rip), %rsi      # 0x8310
callq 0x21c0
movq %r14, %rdi
leaq 0x28b6(%rip), %rsi      # 0x91fb
jmp 0x69c3
movq %r14, %rdi
leaq 0x19ba(%rip), %rsi      # 0x830b
callq 0x21c0
movq %r14, %rdi
leaq 0x19b0(%rip), %rsi      # 0x8310
callq 0x21c0
movq %r14, %rdi
leaq 0x28a1(%rip), %rsi      # 0x9210
jmp 0x69c3
movq %r14, %rdi
leaq 0x1990(%rip), %rsi      # 0x830b
callq 0x21c0
movq %r14, %rdi
leaq 0x1986(%rip), %rsi      # 0x8310
callq 0x21c0
movq %r14, %rdi
leaq 0x284d(%rip), %rsi      # 0x91e6
jmp 0x69c3
movq %r14, %rdi
leaq 0x1966(%rip), %rsi      # 0x830b
callq 0x21c0
movq %r14, %rdi
leaq 0x195c(%rip), %rsi      # 0x8310
callq 0x21c0
movq %r14, %rdi
leaq 0x2877(%rip), %rsi      # 0x923a
callq 0x21c0
movq %rax, %rdi
movl %r15d, %esi
callq 0x2300
movq %rax, %rdi
callq 0x20e0
pushq $0x1
popq %rdi
callq 0x2140
decl %r15d
jmp 0x68a3
movq 0x65de(%rip), %r14      # 0xcfd0
leaq 0x1912(%rip), %rsi      # 0x830b
movq %r14, %rdi
callq 0x21c0
leaq 0x1908(%rip), %rsi      # 0x8310
movq %r14, %rdi
callq 0x21c0
leaq 0x2838(%rip), %rsi      # 0x924f
movq %r14, %rdi
callq 0x21c0
movq %rax, %rdi
movl %r15d, %esi
callq 0x2300
movq %rax, %rdi
callq 0x20e0
pushq $0x1
popq %rdi
callq 0x2140
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq