// File: /workspace/github_cpp_makefile_star2_O1/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 0xb834
movq %rsi, %r15
movl 0x8(%rsi), %eax
cmpl $0x1, %eax
jne 0xb834
movq %r8, %r12
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x2b73(%rip), %rsi      # 0xe010
callq 0x20a0
testl %eax, %eax
je 0xb562
leaq 0x2b5f(%rip), %rsi      # 0xe010
movq %r14, %rdi
callq 0x20a0
testl %eax, %eax
je 0xb4d4
leaq 0x2b4c(%rip), %rsi      # 0xe010
movq %r15, %rdi
callq 0x20a0
testl %eax, %eax
je 0xb650
leaq 0x2b35(%rip), %rsi      # 0xe010
movq %r14, %rdi
callq 0x20a0
testl %eax, %eax
je 0xb834
leaq 0x2b1e(%rip), %rsi      # 0xe010
movq %r15, %rdi
callq 0x20a0
testl %eax, %eax
je 0xb834
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0x88(%rbp), %r12
movq %r12, %rdi
callq 0x3224
movq %r12, %rdi
callq 0x265c
movl %eax, %r13d
testb %al, %al
je 0xb742
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %rdi
callq 0x3224
leaq -0x68(%rbp), %rdi
callq 0x265c
movl %eax, %r12d
jmp 0xb745
leaq 0x2aa7(%rip), %rsi      # 0xe010
movq %r15, %rdi
callq 0x20a0
testl %eax, %eax
je 0xb4aa
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 0x3224
movq %r14, %rdi
callq 0x265c
movl %eax, %r14d
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0xb5c3
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r14b, %r14b
je 0xb834
leaq 0xa0(%rbx), %rsi
leaq 0xc0(%rbx), %rdx
leaq -0x48(%rbp), %rdi
callq 0xa216
leaq -0xd8(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0x3224
leaq -0xe8(%rbp), %rdi
callq 0x2778
movl %eax, %r14d
leaq -0x48(%rbp), %rsi
movq %r12, %rdi
callq 0xa27a
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 0xb728
movq -0xd8(%rbp), %rsi
jmp 0xb720
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 0x3224
movq %r15, %rdi
callq 0x265c
movl %eax, %r15d
movq -0x128(%rbp), %rdi
cmpq %r13, %rdi
je 0xb69a
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r15b, %r15b
je 0xb834
leaq 0xa0(%rbx), %rsi
leaq 0xc0(%rbx), %rdx
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0xa216
movq %r12, %rdi
movq %r15, %rsi
callq 0xa27a
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 0x3224
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 0xb728
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb834
movq -0x38(%rbp), %rsi
jmp 0xb82c
xorl %r12d, %r12d
testb %r13b, %r13b
je 0xb763
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb763
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0xb77f
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r12b, %r12b
je 0xb834
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 0x3224
movq %r15, %rdi
callq 0x2778
movl %eax, %r15d
leaq -0x98(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0xa8(%rbp), %rdi
callq 0x3224
leaq -0xa8(%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 -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0xb819
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x108(%rbp), %rdi
cmpq %r12, %rdi
je 0xb834
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 -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xb906
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xb906
jmp 0xb88c
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0xb93a
movq -0xb8(%rbp), %rsi
jmp 0xb932
movq %rax, %rbx
jmp 0xb93a
movq %rax, %rbx
movq -0x128(%rbp), %rdi
cmpq %r13, %rdi
je 0xb953
movq -0x118(%rbp), %rsi
jmp 0xb94b
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
cmpq %r13, %rdi
je 0xb8d6
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xb8d6
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r12, %rdi
je 0xb953
movq -0xf8(%rbp), %rsi
jmp 0xb94b
movq %rax, %rbx
movq -0x148(%rbp), %rdi
cmpq %r13, %rdi
je 0xb953
movq -0x138(%rbp), %rsi
jmp 0xb94b
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0xb953
movq -0x78(%rbp), %rsi
jmp 0xb94b
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
cmpq %r13, %rdi
je 0xb93a
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb953
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2320