// File: /workspace/github_cpp_makefile_star2_O3/sthapliyal37[P]Microprocessor_8085_Updated/DataTransfer.cpp
// Function: MOV(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 MOV (string instruction,string instruction2,string* registers,bool* flag,map<string,string> &memory)
{
	int length=instruction.length();
	int length2=instruction2.length();
	if(length==1&&length2==1)
	{
        if(instruction=="M"&&instruction2!="M")
        {
            if(validityRegisters(instruction2))
            {
                string address=registers[5]+registers[6];
                memory[address]=registers[registerNumber(instruction2)];
            }
        }
        else if(instruction!="M" && instruction2=="M")
        {
            if(validityRegisters(instruction))
            {
                string address=registers[5]+registers[6];
                registers[registerNumber(instruction)]=memory[address];
            }
        }
        else if(instruction!="M"&&instruction2!="M")
        {
            if(validityRegisters(instruction2)&&validityRegisters(instruction)){
               registers[registerNumber(instruction)]=registers[registerNumber(instruction2)];
		   }
		 }
		 }  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
cmpl $0x1, 0x8(%rdi)
jne 0xb78f
movq %rsi, %r15
movl 0x8(%rsi), %eax
cmpl $0x1, %eax
jne 0xb78f
movq %r8, %r12
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x2c13(%rip), %rsi      # 0xe010
callq 0x20a0
testl %eax, %eax
je 0xb4e4
leaq 0x2bff(%rip), %rsi      # 0xe010
movq %r14, %rdi
callq 0x20a0
testl %eax, %eax
je 0xb434
leaq 0x2bec(%rip), %rsi      # 0xe010
movq %r15, %rdi
callq 0x20a0
testl %eax, %eax
je 0xb5d2
leaq 0x2bd5(%rip), %rsi      # 0xe010
movq %r14, %rdi
callq 0x20a0
testl %eax, %eax
je 0xb78f
leaq 0x2bbe(%rip), %rsi      # 0xe010
movq %r15, %rdi
callq 0x20a0
testl %eax, %eax
je 0xb78f
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %r12
movq %r12, %rdi
callq 0x31ec
movq %r12, %rdi
callq 0x265c
testb %al, %al
je 0xb6c4
leaq -0x98(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0x31ec
leaq -0xa8(%rbp), %rdi
callq 0x265c
movl %eax, %r12d
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0xb6c7
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xb6c7
leaq 0x2b25(%rip), %rsi      # 0xe010
movq %r15, %rdi
callq 0x20a0
testl %eax, %eax
je 0xb40a
leaq -0x138(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x148(%rbp), %r14
movq %r14, %rdi
callq 0x31ec
movq %r14, %rdi
callq 0x265c
movl %eax, %r14d
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0xb545
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r14b, %r14b
je 0xb78f
leaq 0xa0(%rbx), %rsi
leaq 0xc0(%rbx), %rdx
leaq -0x48(%rbp), %rdi
callq 0xa180
leaq -0xd8(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0x31ec
leaq -0xe8(%rbp), %rdi
callq 0x2778
movl %eax, %r14d
leaq -0x48(%rbp), %rsi
movq %r12, %rdi
callq 0xa1e4
movslq %r14d, %rcx
shlq $0x5, %rcx
addq %rcx, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2110
movq -0xe8(%rbp), %rdi
cmpq %r13, %rdi
je 0xb6aa
movq -0xd8(%rbp), %rsi
jmp 0xb6a2
leaq -0x118(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x128(%rbp), %r15
movq %r15, %rdi
callq 0x31ec
movq %r15, %rdi
callq 0x265c
movl %eax, %r15d
movq -0x128(%rbp), %rdi
cmpq %r13, %rdi
je 0xb61c
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r15b, %r15b
je 0xb78f
leaq 0xa0(%rbx), %rsi
leaq 0xc0(%rbx), %rdx
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0xa180
movq %r12, %rdi
movq %r15, %rsi
callq 0xa1e4
movq %rax, %r15
leaq -0xb8(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0xc8(%rbp), %rdi
callq 0x31ec
leaq -0xc8(%rbp), %rdi
callq 0x2778
cltq
shlq $0x5, %rax
addq %rax, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2110
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0xb6aa
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb78f
movq -0x38(%rbp), %rsi
jmp 0xb787
xorl %r12d, %r12d
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xb6e0
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r12b, %r12b
je 0xb78f
leaq -0xf8(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x108(%rbp), %r15
movq %r15, %rdi
callq 0x31ec
movq %r15, %rdi
callq 0x2778
movl %eax, %r15d
leaq -0x78(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %rdi
callq 0x31ec
leaq -0x88(%rbp), %rdi
callq 0x2778
movslq %r15d, %rsi
shlq $0x5, %rsi
addq %rbx, %rsi
movslq %eax, %rdi
shlq $0x5, %rdi
addq %rbx, %rdi
callq 0x2110
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0xb774
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x108(%rbp), %rdi
cmpq %r12, %rdi
je 0xb78f
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x2210
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0xb860
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xb860
jmp 0xb7e9
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0xb891
movq -0xb8(%rbp), %rsi
jmp 0xb889
movq %rax, %rbx
jmp 0xb891
movq %rax, %rbx
movq -0x128(%rbp), %rdi
cmpq %r13, %rdi
je 0xb8aa
movq -0x118(%rbp), %rsi
jmp 0xb8a2
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0xb830
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xb830
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r12, %rdi
je 0xb8aa
movq -0xf8(%rbp), %rsi
jmp 0xb8a2
movq %rax, %rbx
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0xb8aa
movq -0x138(%rbp), %rsi
jmp 0xb8a2
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xb8aa
movq -0x58(%rbp), %rsi
jmp 0xb8a2
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r13, %rdi
je 0xb891
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb8aa
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2320