// File: /workspace/github_cpp_makefile_star2_O1/sthapliyal37[P]Microprocessor_8085_Updated/DataTransfer.cpp
// Function: LXI(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void LXI (string instruction,string instruction2,string* registers,bool* flags,map<string,string> &memory)
{
	int length=instruction.length();
	int length2=instruction2.length();
	if(length==1&&length2==4)
	{
		if(instruction=="M")
		{
			if(validityAddress(instruction2))
			{
				string str1="",str2="";
				for(int i=0;i<2;i++)
				{
					str1+=instruction2[i];
					str2+=instruction2[i+2];
				}
				registers[5]=str1;
				registers[6]=str2;
			}
		}
		else
		{
			if(validityRegisterPair(instruction)&&validityAddress(instruction2))
			{
				string str1="",str2="";
				for(int i=0;i<2;i++)
				{
					str1+=instruction2[i];
					str2+=instruction2[i+2];
				}
				registers[registerNumber(instruction)]=str1;
				registers[registerNumber(instruction)+1]=str2;
			}
		}	
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
cmpl $0x1, 0x8(%rdi)
jne 0xc071
movq %rsi, %r14
movl 0x8(%rsi), %eax
cmpl $0x4, %eax
jne 0xc071
movq %rdx, %r12
movq %rdi, %r15
leaq 0x22a2(%rip), %rsi      # 0xe010
callq 0x20a0
testl %eax, %eax
je 0xbde4
movq %r12, -0x70(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %r12
movq %r12, %rdi
callq 0x3224
movq %r12, %rdi
callq 0x270f
movl %eax, %r13d
testb %al, %al
je 0xbecd
leaq -0xe0(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0xf0(%rbp), %rdi
callq 0x3224
leaq -0xf0(%rbp), %rdi
callq 0x2991
movl %eax, %r12d
jmp 0xbed0
leaq -0x100(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %r15
movq %r15, %rdi
callq 0x3224
movq %r15, %rdi
callq 0x2991
movl %eax, %r15d
movq -0x110(%rbp), %rdi
cmpq %rbx, %rdi
je 0xbe2e
movq -0x100(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r15b, %r15b
je 0xc071
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x23bc(%rip), %rdx      # 0xe202
leaq -0x68(%rbp), %rdi
movq %rdx, %rsi
callq 0x32be
movq %r12, %rbx
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x239e(%rip), %rdx      # 0xe202
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x32be
xorl %r13d, %r13d
leaq -0x68(%rbp), %r15
leaq -0x48(%rbp), %r12
movq (%r14), %rax
movsbl (%rax,%r13), %esi
movq %r15, %rdi
callq 0x21b0
movq (%r14), %rax
movsbl 0x2(%rax,%r13), %esi
movq %r12, %rdi
callq 0x21b0
incq %r13
cmpq $0x1, %r13
je 0xbe7b
leaq 0xa0(%rbx), %rdi
leaq -0x68(%rbp), %rsi
callq 0x2110
addq $0xc0, %rbx
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x2110
jmp 0xc03f
xorl %r12d, %r12d
testb %r13b, %r13b
je 0xbef4
leaq -0xe0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbef4
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0xbf10
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r12b, %r12b
je 0xc071
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22da(%rip), %rdx      # 0xe202
leaq -0x68(%rbp), %rdi
movq %rdx, %rsi
callq 0x32be
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x22bf(%rip), %rdx      # 0xe202
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x32be
xorl %ebx, %ebx
leaq -0x68(%rbp), %r12
leaq -0x48(%rbp), %r13
movq (%r14), %rax
movsbl (%rax,%rbx), %esi
movq %r12, %rdi
callq 0x21b0
movq (%r14), %rax
movsbl 0x2(%rax,%rbx), %esi
movq %r13, %rdi
callq 0x21b0
incq %rbx
cmpq $0x1, %rbx
je 0xbf59
leaq -0xc0(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x3224
movq -0x70(%rbp), %rbx
leaq -0xd0(%rbp), %rdi
callq 0x2778
movslq %eax, %rdi
shlq $0x5, %rdi
addq %rbx, %rdi
leaq -0x68(%rbp), %rsi
callq 0x2110
movq -0xd0(%rbp), %rdi
cmpq %r14, %rdi
je 0xbfe0
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0xa0(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0xb0(%rbp), %rdi
callq 0x3224
leaq -0xb0(%rbp), %rdi
callq 0x2778
cltq
shlq $0x5, %rax
leaq (%rbx,%rax), %rdi
addq $0x20, %rdi
leaq -0x48(%rbp), %rsi
callq 0x2110
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0xc03f
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xc058
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xc071
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc087
jmp 0xc08f
movq %rax, %r15
jmp 0xc149
movq %rax, %r15
jmp 0xc162
movq %rax, %r15
movq -0xf0(%rbp), %rdi
cmpq %rbx, %rdi
je 0xc115
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xc115
jmp 0xc12d
movq %rax, %r15
movq -0x110(%rbp), %rdi
cmpq %rbx, %rdi
je 0xc162
movq -0x100(%rbp), %rsi
jmp 0xc15a
movq %rax, %r15
movq -0xb0(%rbp), %rdi
cmpq %r14, %rdi
je 0xc130
movq -0xa0(%rbp), %rsi
jmp 0xc108
jmp 0xc12d
movq %rax, %r15
movq -0xd0(%rbp), %rdi
cmpq %r14, %rdi
je 0xc130
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xc130
movq %rax, %r15
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0xc162
movq -0x80(%rbp), %rsi
jmp 0xc15a
jmp 0xc12d
movq %rax, %r15
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xc149
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xc162
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq %r15, %rdi
callq 0x2320