// File: /workspace/github_cpp_makefile_star2_O1/lindorx[P]train/InsPro.cpp
// Function: Logic(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, int, char)
std::vector<unsigned char>Logic(const std::string& str, int n, int num, char w_n)
{
	using namespace std;
	vector<unsigned char>data;
	string *ch = CS(str, n);
	unsigned char dt8 = 0, dt16 = 0, dt_ax = 0, dt_al = 0, dt8_num = 0, dt16_num[2] = {0};

	unsigned char a, b;
	const unsigned char *mm;
	if (w_n == 'a'){
		//�Ĵ���֮��
		dt8 = 0x20;
		dt16 = 0x21;
		//�Ĵ�������ֵ
		dt_al = 0x24;
		dt_ax = 0x25;
		dt8_num = 0x80;
		dt16_num[0] = 0x81;//������������0x80ʱ
		dt16_num[1] = 0x83;//��������С��0x80ʱ
		mm = logic_and;
	}
	else if (w_n == 'o'){
		//�Ĵ���֮��
		dt8 = 0x08;
		dt16 = 0x09;
		//�Ĵ�������ֵ
		dt_al = 0x0c;
		dt_ax = 0x0d;
		dt8_num = 0x80;
		dt16_num[0] = 0x81;//������������0x80ʱ
		dt16_num[1] = 0x83;//��������С��0x80ʱ
		mm = logic_or;
	}
	else if (w_n == 'x'){
		//�Ĵ���֮��
		dt8 = 0x30;
		dt16 = 0x31;
		//�Ĵ�������ֵ
		dt_al = 0x34;
		dt_ax = 0x35;
		dt8_num = 0x80;
		dt16_num[0] = 0x81;//������������0x80ʱ
		dt16_num[1] = 0x83;//��������С��0x80ʱ
		mm = logic_xor;
	}
	else{
		cout << "����-025��������login����������" << w_n << endl;
		return data;
	}
	a = TwoRegBin(ch, 1);//�����Ƿ���8λ�Ĵ���
	b = TwoRegBin(ch, 2);//�����Ƿ���16λ�Ĵ���
	if (a){
		data.push_back(dt8);
		data.push_back(a);
		return data;
	}
	if (b){
		data.push_back(dt16);
		data.push_back(b);
		return data;
	}
	vector<unsigned char>d;
	int k = IntNum(ch[1], num);
	d = NumToUc(k, 2);
	if (d.size() <= 0){
		cout << "����-023��������ָ��:" << str << endl;
		return data;
	}
	for (int i = 0; i < 16; ++i){
		if (ch[0] == reg_1[i]){
			if (i == 0 || i == 8){//�ж�Ϊal�Ĵ���
				data.push_back(dt_al);
				data.push_back(d[0]);
				return data;
			}
			data.push_back(dt8_num);
			if (i>7)data.push_back(mm[i - 8]);
			else data.push_back(mm[i]);
			data.push_back(d[0]);
			return data;
		}
		if (ch[0] == reg2[i]){
			if (i == 0 || i == 8){
				data.push_back(dt_ax);
				data.push_back(d[0]);
				data.push_back(d[1]);
				return data;
			}
			if (k > 0x7f) data.push_back(dt16_num[0]);
			else data.push_back(dt16_num[1]);
			if (i > 7)data.push_back(mm[i - 8]);
			else data.push_back(mm[i]);
			data.push_back(d[0]);
			if (k >0x7b)data.push_back(d[1]);
			return data;
		}
	}
	cout << "����-024��������ָ��:" << str << endl;
	return data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, %r13d
movl %ecx, %r14d
movq %rsi, %r12
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rsi, %rdi
movl %edx, %esi
callq 0x3c1e
movq %rax, %r15
xorl %eax, %eax
movb %al, -0x2a(%rbp)
movb %al, -0x29(%rbp)
movb %al, -0x2d(%rbp)
movb %al, -0x2c(%rbp)
movb %al, -0x2b(%rbp)
movw $0x0, -0x30(%rbp)
movsbl %r13b, %eax
cmpl $0x78, %eax
je 0xc879
cmpl $0x6f, %eax
je 0xc858
cmpl $0x61, %eax
jne 0xc908
movb $0x20, -0x2a(%rbp)
movb $0x21, -0x29(%rbp)
movb $0x24, -0x2c(%rbp)
movb $0x25, -0x2d(%rbp)
movb $-0x80, -0x2b(%rbp)
movb $-0x7f, -0x30(%rbp)
leaq 0x4d83(%rip), %r13      # 0x115d9
jmp 0xc898
movb $0x8, -0x2a(%rbp)
movb $0x9, -0x29(%rbp)
movb $0xc, -0x2c(%rbp)
movb $0xd, -0x2d(%rbp)
movb $-0x80, -0x2b(%rbp)
movb $-0x7f, -0x30(%rbp)
leaq 0x4d6a(%rip), %r13      # 0x115e1
jmp 0xc898
movb $0x30, -0x2a(%rbp)
movb $0x31, -0x29(%rbp)
movb $0x34, -0x2c(%rbp)
movb $0x35, -0x2d(%rbp)
movb $-0x80, -0x2b(%rbp)
movb $-0x7f, -0x30(%rbp)
leaq 0x4d51(%rip), %r13      # 0x115e9
movb $-0x7d, -0x2f(%rbp)
movq %r15, %rdi
movl $0x1, %esi
callq 0x3e40
movb %al, -0x2e(%rbp)
movq %r15, %rdi
movl $0x2, %esi
callq 0x3e40
movb %al, -0x31(%rbp)
cmpb $0x0, -0x2e(%rbp)
je 0xc8e1
leaq 0x8(%rbx), %r14
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xc967
movb -0x2a(%rbp), %al
movb %al, (%rsi)
incq (%r14)
jmp 0xc973
testb %al, %al
je 0xc98e
leaq 0x8(%rbx), %r14
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xcab2
movb -0x29(%rbp), %al
movb %al, (%rsi)
incq (%r14)
jmp 0xcabe
movq 0x86c9(%rip), %rdi      # 0x14fd8
leaq 0x4bd7(%rip), %rsi      # 0x114ed
movl $0x1f, %edx
callq 0x2210
leaq -0x80(%rbp), %rsi
movb %r13b, (%rsi)
movq 0x86aa(%rip), %rdi      # 0x14fd8
movl $0x1, %edx
callq 0x2210
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
jmp 0xcc3e
leaq -0x2a(%rbp), %rdx
movq %rbx, %rdi
callq 0x6920
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xc985
movb -0x2e(%rbp), %al
jmp 0xcacb
leaq -0x2e(%rbp), %rdx
jmp 0xcad9
movq %r12, -0x60(%rbp)
movq %r15, %rdi
addq $0x20, %rdi
xorl %r12d, %r12d
movq $0x0, -0x48(%rbp)
movl %r14d, %esi
callq 0x460a
movq %rax, %r14
movslq %r14d, %rsi
leaq -0x80(%rbp), %rdi
movl $0x2, %edx
callq 0x4534
movq -0x80(%rbp), %r12
movq -0x70(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq %r12, -0x78(%rbp)
je 0xcae6
movq %r14, -0x50(%rbp)
movq %r13, -0x58(%rbp)
movq %r12, -0x40(%rbp)
movq 0x8(%r15), %r14
movl $0x8, %r12d
xorl %r13d, %r13d
leaq 0x90fa(%rip), %rax      # 0x15af0
cmpq (%r12,%rax), %r14
jne 0xca24
testq %r14, %r14
je 0xcb57
leaq 0x90e4(%rip), %rax      # 0x15af0
movq -0x8(%r12,%rax), %rsi
movq (%r15), %rdi
movq %r14, %rdx
callq 0x21f0
testl %eax, %eax
je 0xcb57
leaq 0x92c5(%rip), %rax      # 0x15cf0
cmpq (%r12,%rax), %r14
jne 0xca59
testq %r14, %r14
je 0xcb90
leaq 0x92af(%rip), %rax      # 0x15cf0
movq -0x8(%r12,%rax), %rsi
movq (%r15), %rdi
movq %r14, %rdx
callq 0x21f0
testl %eax, %eax
je 0xcb90
decq %r13
addq $0x20, %r12
cmpq $-0x10, %r13
jne 0xc9ef
movq 0x856b(%rip), %rdi      # 0x14fd8
leaq 0x4aaf(%rip), %rsi      # 0x11523
movl $0x15, %edx
movq -0x40(%rbp), %r12
callq 0x2210
movq -0x60(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x8544(%rip), %rdi      # 0x14fd8
callq 0x2210
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
jmp 0xcb2c
leaq -0x29(%rbp), %rdx
movq %rbx, %rdi
callq 0x6920
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xcad5
movb -0x31(%rbp), %al
movb %al, (%rsi)
incq (%r14)
jmp 0xcc3e
leaq -0x31(%rbp), %rdx
movq %rbx, %rdi
callq 0x6920
jmp 0xcc3e
movq 0x84eb(%rip), %rdi      # 0x14fd8
leaq 0x4a19(%rip), %rsi      # 0x1150d
movl $0x15, %edx
callq 0x2210
movq -0x60(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq 0x84c8(%rip), %rdi      # 0x14fd8
callq 0x2210
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2130
testq %r12, %r12
je 0xcc3e
movq -0x48(%rbp), %rsi
subq %r12, %rsi
movq %r12, %rdi
jmp 0xcc39
movq %r13, %r14
negq %r14
testb $0x7, %r14b
je 0xcbee
leaq -0x2b(%rbp), %rsi
movq %rbx, %rdi
movq -0x40(%rbp), %r15
callq 0x6734
movl $0xfffffff8, %eax       # imm = 0xFFFFFFF8
subl %r13d, %eax
cmpq $0x8, %r14
cmovbq %r14, %rax
movq -0x58(%rbp), %rsi
addq %rax, %rsi
jmp 0xcbf6
movq %r13, %r14
negq %r14
testb $0x7, %r14b
je 0xcc03
xorl %eax, %eax
cmpl $0x80, -0x50(%rbp)
setl %al
leaq (%rax,%rbp), %rsi
addq $-0x30, %rsi
movq %rbx, %rdi
movq -0x40(%rbp), %r15
callq 0x6734
movl $0xfffffff8, %eax       # imm = 0xFFFFFFF8
subl %r13d, %eax
cmpq $0x8, %r14
cmovbq %r14, %rax
movq -0x58(%rbp), %rsi
addq %rax, %rsi
movq %rbx, %rdi
callq 0x6734
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6734
cmpl $0x7c, -0x50(%rbp)
jge 0xcc1e
jmp 0xcc2a
leaq -0x2c(%rbp), %rsi
movq -0x40(%rbp), %r15
movq %rbx, %rdi
callq 0x6734
movq %r15, %rsi
jmp 0xcc22
leaq -0x2d(%rbp), %rsi
movq %rbx, %rdi
movq -0x40(%rbp), %r15
callq 0x6734
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6734
leaq 0x1(%r15), %rsi
movq %rbx, %rdi
callq 0x6734
testq %r15, %r15
je 0xcc3e
movq -0x48(%rbp), %rsi
subq %r15, %rsi
movq %r15, %rdi
callq 0x21d0
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
jmp 0xcc6e
jmp 0xcc6b
movq %r12, -0x40(%rbp)
movq %rax, %r14
cmpq $0x0, -0x40(%rbp)
je 0xcc8c
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
callq 0x21d0
jmp 0xcc8c
jmp 0xcc89
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xcca0
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21d0
movq %r14, %rdi
callq 0x2300