// File: /workspace/github_cpp_makefile_star2_O3/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, %r15
movq 0x70a7(%rip), %r14      # 0xefd0
leaq 0x332b(%rip), %rsi      # 0xb25b
movl $0x20, %edx
movq %r14, %rdi
callq 0x2240
movq 0x709c(%rip), %r13      # 0xefe0
leaq -0x3c(%rbp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x20f0
leaq 0x10(%r15), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4538
testq %rax, %rax
je 0x806e
movq %rax, %rbx
movq %r12, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq %rax, %rdi
callq 0x4016
leaq 0x31b0(%rip), %r15      # 0xb135
movq %rbx, %rdi
callq 0x34f0
testl %eax, %eax
jle 0x8089
leaq 0x2864(%rip), %rdi      # 0xa800
callq 0x2170
movl $0x12, %edx
movq %r14, %rdi
leaq 0x3161(%rip), %rsi      # 0xb111
callq 0x2240
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %rax, %r12
movl $0x10, %edx
movq %rax, %rdi
leaq 0x3136(%rip), %rsi      # 0xb124
callq 0x2240
movl $0x5, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2240
movq %rbx, %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 $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x3d6a
movq %rbx, %rdi
callq 0x3f16
movl $0x1, %edi
callq 0x2130
movq %rbx, %rdi
callq 0x34f0
testl %eax, %eax
jne 0x7f85
jmp 0x8311
leaq 0x3243(%rip), %rsi      # 0xb2b8
movl $0x11, %edx
movq %r14, %rdi
callq 0x2240
xorl %ebx, %ebx
jmp 0x86d3
movl $0x3, %r12d
movl $0x23, %edx
movq %r14, %rdi
leaq 0x31de(%rip), %rsi      # 0xb27c
callq 0x2240
movq (%r13), %rax
movq -0x18(%rax), %rax
movq 0x10(%r13,%rax), %r15
movl $0x20, %edx
movq %r13, %rdi
leaq -0x60(%rbp), %rsi
callq 0x2330
movq (%r13), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r13,%rax)
jne 0x80f1
addq $-0x21, %r15
cmpq $-0x21, %r15
ja 0x80f1
movq 0xe8(%r13,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x817a
movl $0x5, %edx
movq %r14, %rdi
leaq 0x305e(%rip), %rsi      # 0xb15e
callq 0x2240
movl $0x5, %edx
movq %r14, %rdi
leaq 0x3021(%rip), %rsi      # 0xb135
callq 0x2240
movq %rbx, %rdi
callq 0x34dc
leaq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x22a0
testl %eax, %eax
je 0x8184
movl $0x17, %edx
movq %r14, %rdi
leaq 0x3160(%rip), %rsi      # 0xb2a0
callq 0x2240
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
decl %r12d
jne 0x808f
jmp 0x821b
callq 0x3152
jmp 0x80f1
movq 0x6e45(%rip), %r14      # 0xefd0
leaq 0x2fcc(%rip), %rsi      # 0xb15e
movl $0x5, %edx
movq %r14, %rdi
callq 0x2240
movq -0x30(%rbp), %rax
movq %rax, 0xb0(%rbx)
movq -0x38(%rbp), %r15
addq $0x28, %r15
movq %r15, %rdi
callq 0x7086
movq %r15, 0xa8(%rbx)
movq %rbx, %rdi
callq 0x36f0
testq %rax, %rax
je 0x8318
movq 0x6df7(%rip), %r15      # 0xefd0
leaq 0x2f84(%rip), %rsi      # 0xb164
movl $0x18, %edx
movq %r15, %rdi
callq 0x2240
movq %rbx, %rdi
callq 0x36f0
testq %rax, %rax
je 0x8332
movq %rax, %r12
movq %rax, %rdi
callq 0x20c0
movq 0x6dc0(%rip), %rdi      # 0xefd0
movq %r12, %rsi
movq %rax, %rdx
jmp 0x832b
movq %rbx, %rdi
callq 0x3d74
movq %rbx, %rdi
callq 0x34f0
testl %eax, %eax
jle 0x8311
leaq 0x2eea(%rip), %r13      # 0xb124
leaq 0x2ef4(%rip), %r15      # 0xb135
leaq 0x25b8(%rip), %rdi      # 0xa800
callq 0x2170
movl $0x12, %edx
movq %r14, %rdi
leaq 0x2eb5(%rip), %rsi      # 0xb111
callq 0x2240
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %rax, %r12
movl $0x10, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x2240
movl $0x5, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2240
movq %rbx, %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 $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x3d6a
movq %rbx, %rdi
callq 0x3f16
movl $0x1, %edi
callq 0x2130
movq %rbx, %rdi
callq 0x34f0
testl %eax, %eax
jg 0x8241
xorl %ebx, %ebx
jmp 0x8704
movq 0x6cb1(%rip), %rdi      # 0xefd0
leaq 0x2e57(%rip), %rsi      # 0xb17d
movl $0x16, %edx
callq 0x2240
jmp 0x834a
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x2310
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x36aa
movq %rbx, %rdi
callq 0x4936
leaq 0x2e0c(%rip), %rsi      # 0xb194
movl $0x12, %edx
movq %r14, %rdi
callq 0x2240
movq %rbx, %rdi
callq 0x36f0
testq %rax, %rax
je 0x83c1
movq %rax, %r15
movq %rax, %rdi
callq 0x20c0
movq 0x6c1c(%rip), %rdi      # 0xefd0
movq %r15, %rsi
movq %rax, %rdx
callq 0x2240
jmp 0x83d9
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2310
leaq 0x2dc7(%rip), %rsi      # 0xb1a7
movl $0xd, %edx
movq %r14, %rdi
callq 0x2240
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
xorl %edi, %edi
callq 0x2190
movl %eax, %edi
callq 0x21b0
movl $0x2, %r15d
leaq 0x22eb(%rip), %r13      # 0xa744
callq 0x2090
cltq
imulq $0x2aaaaaab, %rax, %rcx # imm = 0x2AAAAAAB
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %eax
cmpl $0x5, %eax
ja 0x8679
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1e81(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1e72(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2cf0(%rip), %rsi      # 0xb1b5
callq 0x2240
movq %r14, %rdi
movl %r15d, %esi
callq 0x2340
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
decl %r15d
movl $0x1, %edi
callq 0x2130
jmp 0x8679
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1dfe(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1def(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2cc1(%rip), %rsi      # 0xb209
jmp 0x8632
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1dc2(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1db3(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2c5b(%rip), %rsi      # 0xb1df
jmp 0x8632
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1d86(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1d77(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2c34(%rip), %rsi      # 0xb1f4
jmp 0x8632
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1d4d(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1d3e(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2bd1(%rip), %rsi      # 0xb1ca
jmp 0x8632
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1d14(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1d05(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2bec(%rip), %rsi      # 0xb21e
callq 0x2240
movq %r14, %rdi
movl %r15d, %esi
callq 0x2340
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movl $0x1, %edi
callq 0x2130
decl %r15d
testl %r15d, %r15d
jg 0x8459
movq 0x6947(%rip), %r14      # 0xefd0
leaq 0x1c8e(%rip), %rsi      # 0xa31e
movl $0x4, %edx
movq %r14, %rdi
callq 0x2240
leaq 0x1c7f(%rip), %rsi      # 0xa323
movl $0x3, %edx
movq %r14, %rdi
callq 0x2240
leaq 0x2b7b(%rip), %rsi      # 0xb233
movl $0x14, %edx
movq %r14, %rdi
callq 0x2240
movq %r14, %rdi
movl %r15d, %esi
callq 0x2340
movq %rax, %r14
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2110
movl $0x1, %edi
callq 0x2130
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq