// File: /workspace/github_cpp_makefile_star2_O3/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 0xbfd9
movq %rsi, %r14
movl 0x8(%rsi), %eax
cmpl $0x4, %eax
jne 0xbfd9
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x2359(%rip), %rsi      # 0xe010
callq 0x20a0
testl %eax, %eax
je 0xbd50
leaq -0xe8(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rbx), %rsi
movq %rbx, -0x78(%rbp)
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0xf8(%rbp), %r12
movq %r12, %rdi
callq 0x31ec
movq %r12, %rdi
callq 0x270f
testb %al, %al
je 0xbe46
leaq -0xc8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0xd8(%rbp), %rdi
callq 0x31ec
leaq -0xd8(%rbp), %rdi
callq 0x2997
movl %eax, %r12d
movq -0xd8(%rbp), %rdi
cmpq %rbx, %rdi
je 0xbe49
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xbe49
movq %r15, -0x70(%rbp)
leaq -0x108(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x118(%rbp), %r15
movq %r15, %rdi
callq 0x31ec
movq %r15, %rdi
callq 0x2997
movl %eax, %r15d
movq -0x118(%rbp), %rdi
cmpq %rbx, %rdi
je 0xbd9e
movq -0x108(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r15b, %r15b
je 0xbfd9
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x244c(%rip), %rdx      # 0xe202
leaq -0x68(%rbp), %rdi
movq %rdx, %rsi
callq 0x328a
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2431(%rip), %rdx      # 0xe202
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x328a
movb $0x1, %r13b
xorl %ebx, %ebx
leaq -0x68(%rbp), %r15
leaq -0x48(%rbp), %r12
movq (%r14), %rax
movsbl (%rax,%rbx), %esi
movq %r15, %rdi
callq 0x21b0
movq (%r14), %rax
movsbl 0x2(%rax,%rbx), %esi
movq %r12, %rdi
callq 0x21b0
movl $0x1, %ebx
testb $0x1, %r13b
movl $0x0, %r13d
jne 0xbdea
movq -0x70(%rbp), %rbx
leaq 0xa0(%rbx), %rdi
leaq -0x68(%rbp), %rsi
callq 0x2110
addq $0xc0, %rbx
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x2110
jmp 0xbfa7
xorl %r12d, %r12d
movq -0xf8(%rbp), %rdi
cmpq %r13, %rdi
je 0xbe64
movq -0xe8(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r12b, %r12b
je 0xbfd9
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2386(%rip), %rdx      # 0xe202
leaq -0x68(%rbp), %rdi
movq %rdx, %rsi
callq 0x328a
movq %r15, -0x70(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2367(%rip), %rdx      # 0xe202
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x328a
movb $0x1, %bl
xorl %r15d, %r15d
leaq -0x68(%rbp), %r12
leaq -0x48(%rbp), %r13
movq (%r14), %rax
movsbl (%rax,%r15), %esi
movq %r12, %rdi
callq 0x21b0
movq (%r14), %rax
movsbl 0x2(%rax,%r15), %esi
movq %r13, %rdi
callq 0x21b0
movl $0x1, %r15d
testb $0x1, %bl
movl $0x0, %ebx
jne 0xbeb4
leaq -0xa8(%rbp), %r14
movq %r14, -0x10(%r14)
movq -0x78(%rbp), %r15
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %rdi
callq 0x31ec
movq -0x70(%rbp), %rbx
leaq -0xb8(%rbp), %rdi
callq 0x2778
movslq %eax, %rdi
shlq $0x5, %rdi
addq %rbx, %rdi
leaq -0x68(%rbp), %rsi
callq 0x2110
movq -0xb8(%rbp), %rdi
cmpq %r14, %rdi
je 0xbf48
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x88(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x98(%rbp), %rdi
callq 0x31ec
leaq -0x98(%rbp), %rdi
callq 0x2778
cltq
shlq $0x5, %rax
leaq (%rbx,%rax), %rdi
addq $0x20, %rdi
leaq -0x48(%rbp), %rsi
callq 0x2110
movq -0x98(%rbp), %rdi
cmpq %r14, %rdi
je 0xbfa7
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xbfc0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xbfd9
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xbfef
jmp 0xbff7
movq %rax, %r15
jmp 0xc0b0
movq %rax, %r15
jmp 0xc0c9
movq %rax, %r15
movq -0xd8(%rbp), %rdi
cmpq %rbx, %rdi
je 0xc07d
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xc07d
jmp 0xc094
movq %rax, %r15
movq -0x118(%rbp), %rdi
cmpq %rbx, %rdi
je 0xc0c9
movq -0x108(%rbp), %rsi
jmp 0xc0c1
movq %rax, %r15
movq -0x98(%rbp), %rdi
cmpq %r14, %rdi
je 0xc097
movq -0x88(%rbp), %rsi
jmp 0xc070
jmp 0xc094
movq %rax, %r15
movq -0xb8(%rbp), %rdi
cmpq %r14, %rdi
je 0xc097
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xc097
movq %rax, %r15
movq -0xf8(%rbp), %rdi
cmpq %r13, %rdi
je 0xc0c9
movq -0xe8(%rbp), %rsi
jmp 0xc0c1
jmp 0xc094
movq %rax, %r15
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0xc0b0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xc0c9
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq %r15, %rdi
callq 0x2320