// File: 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
subq $0x220, %rsp            # imm = 0x220
movq %rdi, -0x198(%rbp)
movq %rsi, -0x190(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
callq 0x33b0
movq -0x190(%rbp), %rdi
movl %eax, -0x2c(%rbp)
callq 0x33b0
movl %eax, -0x30(%rbp)
cmpl $0x1, -0x2c(%rbp)
jne 0x11e9e
cmpl $0x4, -0x30(%rbp)
jne 0x11e9e
movq -0x198(%rbp), %rdi
leaq 0x372a(%rip), %rsi      # 0x15010
callq 0x50a0
testb $0x1, %al
jne 0x118f4
jmp 0x11b05
movq -0x190(%rbp), %rsi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x3110
movq -0x1a8(%rbp), %rdi
callq 0x3db0
movb %al, -0x199(%rbp)
jmp 0x1191f
leaq -0x50(%rbp), %rdi
callq 0x3190
movb -0x199(%rbp), %al
testb $0x1, %al
jne 0x11937
jmp 0x11b00
leaq -0x81(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x3440
movq -0x1b0(%rbp), %rdx
leaq 0x38aa(%rip), %rsi      # 0x15202
leaq -0x80(%rbp), %rdi
callq 0x50d0
jmp 0x11963
leaq -0x81(%rbp), %rdi
callq 0x32f0
leaq -0xa9(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x3440
movq -0x1b8(%rbp), %rdx
leaq 0x3872(%rip), %rsi      # 0x15202
leaq -0xa8(%rbp), %rdi
callq 0x50d0
jmp 0x1199e
leaq -0xa9(%rbp), %rdi
callq 0x32f0
movl $0x0, -0xb0(%rbp)
cmpl $0x2, -0xb0(%rbp)
jge 0x11aac
movq -0x190(%rbp), %rdi
movslq -0xb0(%rbp), %rsi
callq 0x34a0
movq %rax, -0x1c0(%rbp)
jmp 0x119dd
movq -0x1c0(%rbp), %rax
movsbl (%rax), %esi
leaq -0x80(%rbp), %rdi
callq 0x31a0
jmp 0x119f2
movq -0x190(%rbp), %rdi
movl -0xb0(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0x34a0
movq %rax, -0x1c8(%rbp)
jmp 0x11a13
movq -0x1c8(%rbp), %rax
movsbl (%rax), %esi
leaq -0xa8(%rbp), %rdi
callq 0x31a0
jmp 0x11a2b
jmp 0x11a2d
movl -0xb0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb0(%rbp)
jmp 0x119b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3190
jmp 0x11ea7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x81(%rbp), %rdi
callq 0x32f0
jmp 0x11ea7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa9(%rbp), %rdi
callq 0x32f0
jmp 0x11af2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x3190
jmp 0x11af2
movq -0x18(%rbp), %rdi
addq $0xa0, %rdi
leaq -0x80(%rbp), %rsi
callq 0x3050
jmp 0x11ac2
movq -0x18(%rbp), %rdi
addq $0xc0, %rdi
leaq -0xa8(%rbp), %rsi
callq 0x3050
jmp 0x11adb
leaq -0xa8(%rbp), %rdi
callq 0x3190
leaq -0x80(%rbp), %rdi
callq 0x3190
jmp 0x11b00
leaq -0x80(%rbp), %rdi
callq 0x3190
jmp 0x11ea7
jmp 0x11e9c
movq -0x198(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x3110
movq -0x1d8(%rbp), %rdi
movb $0x0, -0xf1(%rbp)
callq 0x38d0
movb %al, -0x1c9(%rbp)
jmp 0x11b3a
movb -0x1c9(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x1d9(%rbp)
jne 0x11b4f
jmp 0x11b8d
movq -0x190(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x3110
jmp 0x11b64
movb $0x1, -0xf1(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x3db0
movb %al, -0x1da(%rbp)
jmp 0x11b7f
movb -0x1da(%rbp), %al
movb %al, -0x1d9(%rbp)
jmp 0x11b8d
movb -0x1d9(%rbp), %al
movb %al, -0x1db(%rbp)
testb $0x1, -0xf1(%rbp)
jne 0x11ba4
jmp 0x11bb0
leaq -0xf0(%rbp), %rdi
callq 0x3190
leaq -0xd0(%rbp), %rdi
callq 0x3190
movb -0x1db(%rbp), %al
testb $0x1, %al
jne 0x11bcb
jmp 0x11e9a
leaq -0x119(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x3440
movq -0x1e8(%rbp), %rdx
leaq 0x3616(%rip), %rsi      # 0x15202
leaq -0x118(%rbp), %rdi
callq 0x50d0
jmp 0x11bfa
leaq -0x119(%rbp), %rdi
callq 0x32f0
leaq -0x141(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x3440
movq -0x1f0(%rbp), %rdx
leaq 0x35db(%rip), %rsi      # 0x15202
leaq -0x140(%rbp), %rdi
callq 0x50d0
jmp 0x11c35
leaq -0x141(%rbp), %rdi
callq 0x32f0
movl $0x0, -0x148(%rbp)
cmpl $0x2, -0x148(%rbp)
jge 0x11d6a
movq -0x190(%rbp), %rdi
movslq -0x148(%rbp), %rsi
callq 0x34a0
movq %rax, -0x1f8(%rbp)
jmp 0x11c74
movq -0x1f8(%rbp), %rax
movsbl (%rax), %esi
leaq -0x118(%rbp), %rdi
callq 0x31a0
jmp 0x11c8c
movq -0x190(%rbp), %rdi
movl -0x148(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0x34a0
movq %rax, -0x200(%rbp)
jmp 0x11cad
movq -0x200(%rbp), %rax
movsbl (%rax), %esi
leaq -0x140(%rbp), %rdi
callq 0x31a0
jmp 0x11cc5
jmp 0x11cc7
movl -0x148(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x148(%rbp)
jmp 0x11c4b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x11d0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
testb $0x1, -0xf1(%rbp)
jne 0x11d00
jmp 0x11d0c
leaq -0xf0(%rbp), %rdi
callq 0x3190
jmp 0x11d0e
leaq -0xd0(%rbp), %rdi
callq 0x3190
jmp 0x11ea7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x119(%rbp), %rdi
callq 0x32f0
jmp 0x11ea7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x141(%rbp), %rdi
callq 0x32f0
jmp 0x11e8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x11e80
movq -0x198(%rbp), %rsi
movq -0x18(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x3110
jmp 0x11d8a
leaq -0x168(%rbp), %rdi
callq 0x3970
movl %eax, -0x20c(%rbp)
jmp 0x11d9e
movq -0x208(%rbp), %rdi
movl -0x20c(%rbp), %eax
cltq
shlq $0x5, %rax
addq %rax, %rdi
leaq -0x118(%rbp), %rsi
callq 0x3050
jmp 0x11dc2
leaq -0x168(%rbp), %rdi
callq 0x3190
movq -0x198(%rbp), %rsi
movq -0x18(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x3110
jmp 0x11dee
leaq -0x188(%rbp), %rdi
callq 0x3970
movl %eax, -0x21c(%rbp)
jmp 0x11e02
movq -0x218(%rbp), %rcx
movl -0x21c(%rbp), %eax
cltq
shlq $0x5, %rax
leaq 0x20(%rax,%rcx), %rdi
leaq -0x140(%rbp), %rsi
callq 0x3050
jmp 0x11e28
leaq -0x188(%rbp), %rdi
callq 0x3190
leaq -0x140(%rbp), %rdi
callq 0x3190
leaq -0x118(%rbp), %rdi
callq 0x3190
jmp 0x11e9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x3190
jmp 0x11e80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x3190
leaq -0x140(%rbp), %rdi
callq 0x3190
leaq -0x118(%rbp), %rdi
callq 0x3190
jmp 0x11ea7
jmp 0x11e9c
jmp 0x11e9e
addq $0x220, %rsp            # imm = 0x220
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x3430