// File: /workspace/github_cpp_makefile_star2_O1/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 0x711f(%rip), %r14      # 0xefd0
leaq 0x3373(%rip), %rsi      # 0xb22b
movl $0x20, %edx
movq %r14, %rdi
callq 0x2240
movq 0x7114(%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 0x4344
testq %rax, %rax
je 0x7ff6
movq %rax, %rbx
movq %r12, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movq %rax, %rdi
callq 0x3e3a
leaq 0x31f8(%rip), %r15      # 0xb105
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jle 0x8011
leaq 0x28ac(%rip), %rdi      # 0xa7d0
callq 0x2170
movl $0x12, %edx
movq %r14, %rdi
leaq 0x31a9(%rip), %rsi      # 0xb0e1
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 0x317e(%rip), %rsi      # 0xb0f4
callq 0x2240
movl $0x5, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x2240
movq %rbx, %rdi
callq 0x31f0
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 0x3b8e
movq %rbx, %rdi
callq 0x3d3a
movl $0x1, %edi
callq 0x2130
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jne 0x7f0d
jmp 0x8299
leaq 0x328b(%rip), %rsi      # 0xb288
movl $0x11, %edx
movq %r14, %rdi
callq 0x2240
xorl %ebx, %ebx
jmp 0x876c
movl $0x3, %r12d
movl $0x23, %edx
movq %r14, %rdi
leaq 0x3226(%rip), %rsi      # 0xb24c
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 0x8079
addq $-0x21, %r15
cmpq $-0x21, %r15
ja 0x8079
movq 0xe8(%r13,%rax), %rdi
movq 0x10(%rdi), %rax
cmpq 0x18(%rdi), %rax
jae 0x8102
movl $0x5, %edx
movq %r14, %rdi
leaq 0x30a6(%rip), %rsi      # 0xb12e
callq 0x2240
movl $0x5, %edx
movq %r14, %rdi
leaq 0x3069(%rip), %rsi      # 0xb105
callq 0x2240
movq %rbx, %rdi
callq 0x31dc
leaq -0x60(%rbp), %rdi
movq %rax, %rsi
callq 0x22a0
testl %eax, %eax
je 0x810c
movl $0x17, %edx
movq %r14, %rdi
leaq 0x31a8(%rip), %rsi      # 0xb270
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 0x8017
jmp 0x81a3
callq 0x2e53
jmp 0x8079
movq 0x6ebd(%rip), %r14      # 0xefd0
leaq 0x3014(%rip), %rsi      # 0xb12e
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 0x7008
movq %r15, 0xa8(%rbx)
movq %rbx, %rdi
callq 0x33e6
testq %rax, %rax
je 0x82a0
movq 0x6e6f(%rip), %r15      # 0xefd0
leaq 0x2fcc(%rip), %rsi      # 0xb134
movl $0x18, %edx
movq %r15, %rdi
callq 0x2240
movq %rbx, %rdi
callq 0x33e6
testq %rax, %rax
je 0x82ba
movq %rax, %r12
movq %rax, %rdi
callq 0x20c0
movq 0x6e38(%rip), %rdi      # 0xefd0
movq %r12, %rsi
movq %rax, %rdx
jmp 0x82b3
movq %rbx, %rdi
callq 0x3b98
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jle 0x8299
leaq 0x2f32(%rip), %r13      # 0xb0f4
leaq 0x2f3c(%rip), %r15      # 0xb105
leaq 0x2600(%rip), %rdi      # 0xa7d0
callq 0x2170
movl $0x12, %edx
movq %r14, %rdi
leaq 0x2efd(%rip), %rsi      # 0xb0e1
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 0x31f0
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 0x3b8e
movq %rbx, %rdi
callq 0x3d3a
movl $0x1, %edi
callq 0x2130
movq %rbx, %rdi
callq 0x31f0
testl %eax, %eax
jg 0x81c9
xorl %ebx, %ebx
jmp 0x879d
movq 0x6d29(%rip), %rdi      # 0xefd0
leaq 0x2e9f(%rip), %rsi      # 0xb14d
movl $0x16, %edx
callq 0x2240
jmp 0x82d2
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 0x33a0
movq %rbx, %rdi
callq 0x4742
leaq 0x2e54(%rip), %rsi      # 0xb164
movl $0x12, %edx
movq %r14, %rdi
callq 0x2240
movq %rbx, %rdi
callq 0x33e6
testq %rax, %rax
je 0x8349
movq %rax, %r15
movq %rax, %rdi
callq 0x20c0
movq 0x6c94(%rip), %rdi      # 0xefd0
movq %r15, %rsi
movq %rax, %rdx
callq 0x2240
jmp 0x8361
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x2310
leaq 0x2e0f(%rip), %rsi      # 0xb177
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
callq 0x2090
movslq %eax, %r13
imulq $0x2aaaaaab, %r13, %rax # imm = 0x2AAAAAAB
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
addl %eax, %eax
leal (%rax,%rax,2), %eax
subl %eax, %r13d
jne 0x847e
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1f0f(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1f00(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2d4e(%rip), %rsi      # 0xb185
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
cmpl $0x1, %r13d
jne 0x8502
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1e8b(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1e7c(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2cdf(%rip), %rsi      # 0xb19a
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
cmpl $0x2, %r13d
jne 0x8586
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1e07(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1df8(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2c70(%rip), %rsi      # 0xb1af
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
cmpl $0x3, %r13d
jne 0x860a
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1d83(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1d74(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2c01(%rip), %rsi      # 0xb1c4
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
cmpl $0x4, %r13d
jne 0x868e
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1cff(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1cf0(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2b92(%rip), %rsi      # 0xb1d9
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
cmpl $0x5, %r13d
jne 0x8712
movl $0x4, %edx
movq %r14, %rdi
leaq 0x1c7b(%rip), %rsi      # 0xa31e
callq 0x2240
movl $0x3, %edx
movq %r14, %rdi
leaq 0x1c6c(%rip), %rsi      # 0xa323
callq 0x2240
movl $0x14, %edx
movq %r14, %rdi
leaq 0x2b23(%rip), %rsi      # 0xb1ee
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 0x83da
movq 0x68ae(%rip), %r14      # 0xefd0
leaq 0x1bf5(%rip), %rsi      # 0xa31e
movl $0x4, %edx
movq %r14, %rdi
callq 0x2240
leaq 0x1be6(%rip), %rsi      # 0xa323
movl $0x3, %edx
movq %r14, %rdi
callq 0x2240
leaq 0x2ab2(%rip), %rsi      # 0xb203
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
nop