// File: /workspace/github_cpp_makefile_star2_O2/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 $0xf8, %rsp
cmpl $0x1, 0x8(%rdi)
jne 0x880a
movq %rsi, %r14
movl 0x8(%rsi), %eax
cmpl $0x4, %eax
jne 0x880a
movq %rdx, %rbx
movq %rdi, %r15
leaq 0x1a28(%rip), %rsi      # 0xa010
callq 0x2f0d
testb %al, %al
je 0x868a
leaq -0x118(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x2280
movq %r15, %rdi
callq 0x2915
movl %eax, %r15d
leaq -0x118(%rbp), %rdi
callq 0x20f0
testb %r15b, %r15b
je 0x880a
leaq 0x1bd4(%rip), %rsi      # 0xa202
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0x2f1e
leaq 0x1bc0(%rip), %rsi      # 0xa202
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2f1e
xorl %r13d, %r13d
leaq -0x70(%rbp), %r15
leaq -0x50(%rbp), %r12
cmpq $0x2, %r13
je 0x8757
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
jmp 0x865a
leaq -0xf8(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x2280
movq %r12, %rdi
callq 0x26da
testb %al, %al
je 0x874b
leaq -0xd8(%rbp), %rdi
movq %r14, %rsi
callq 0x2280
leaq -0xd8(%rbp), %rdi
callq 0x2915
movl %eax, %r12d
leaq -0xd8(%rbp), %rdi
callq 0x20f0
leaq -0xf8(%rbp), %rdi
callq 0x20f0
testb %r12b, %r12b
je 0x880a
leaq 0x1b10(%rip), %rsi      # 0xa202
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0x2f1e
movq %rbx, -0x78(%rbp)
leaq 0x1af8(%rip), %rsi      # 0xa202
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2f1e
xorl %ebx, %ebx
leaq -0x70(%rbp), %r12
leaq -0x50(%rbp), %r13
cmpq $0x2, %rbx
je 0x877c
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
jmp 0x8721
leaq -0xf8(%rbp), %rdi
jmp 0x8805
leaq 0xa0(%rbx), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2120
addq $0xc0, %rbx
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x2120
jmp 0x87f8
leaq -0xb8(%rbp), %rdi
movq %r15, %rsi
callq 0x2280
movq -0x78(%rbp), %rbx
leaq -0xb8(%rbp), %rdi
callq 0x2740
movslq %eax, %rdi
shlq $0x5, %rdi
addq %rbx, %rdi
leaq -0x70(%rbp), %rsi
callq 0x2120
leaq -0xb8(%rbp), %rdi
callq 0x20f0
leaq -0x98(%rbp), %rdi
movq %r15, %rsi
callq 0x2280
leaq -0x98(%rbp), %rdi
callq 0x2740
cltq
shlq $0x5, %rax
leaq (%rbx,%rax), %rdi
addq $0x20, %rdi
leaq -0x50(%rbp), %rsi
callq 0x2120
leaq -0x98(%rbp), %rdi
callq 0x20f0
leaq -0x50(%rbp), %rdi
callq 0x20f0
leaq -0x70(%rbp), %rdi
callq 0x20f0
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8850
jmp 0x8855
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
jmp 0x8838
jmp 0x8876
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x20f0
jmp 0x8879
movq %rax, %rbx
leaq -0xd8(%rbp), %rdi
callq 0x20f0
jmp 0x886b
movq %rax, %rbx
jmp 0x8882
movq %rax, %rbx
jmp 0x888b
jmp 0x8876
movq %rax, %rbx
leaq -0x118(%rbp), %rdi
jmp 0x8886
movq %rax, %rbx
leaq -0xf8(%rbp), %rdi
jmp 0x8886
jmp 0x8876
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x20f0
leaq -0x70(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2310