// File: /workspace/github_cpp_makefile_star2_O3/sthapliyal37[P]Microprocessor_8085_Updated/arithmetic.cpp
// Function: INR(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 INR(string instruction,string* registers,bool* flag,map<string,string> &memory)
{
	int length = instruction.length();
	if(length == 1){
	
		if(validityRegisters(instruction)){
		
			if(instruction != "M"){
				int registerID = registerNumber(instruction);
				registers[registerID] = hexAdd(registers[registerID],"01",flag,false); 
			}
			else{
				string address = "";
				address = address + registers[5] + registers[6];
				if(validityAddress(address)){
				
					memory[address] = hexAdd(memory[address],"01",flag,false);
				}
					else{
					
					cout<<"Error:\n";
					exit(0);
				}
			}
			}
			}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdx, %rax
movq 0x8(%rdi), %rdx
cmpl $0x1, %edx
jne 0x811f
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rax, -0x30(%rbp)
leaq -0x160(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rdi), %rsi
addq %rsi, %rdx
leaq -0x170(%rbp), %r13
movq %r13, %rdi
callq 0x31ec
movq %r13, %rdi
callq 0x265c
movl %eax, %r13d
movq -0x170(%rbp), %rdi
cmpq %rbx, %rdi
je 0x7dcd
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r13b, %r13b
movq -0x30(%rbp), %rbx
je 0x811f
leaq 0x622f(%rip), %rsi      # 0xe010
movq %r12, %rdi
callq 0x20a0
testl %eax, %eax
je 0x7f0b
leaq -0x140(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
leaq -0x150(%rbp), %r14
movq %r14, %rdi
callq 0x31ec
movq %r14, %rdi
callq 0x2778
movl %eax, %r14d
movq -0x150(%rbp), %rdi
cmpq %r13, %rdi
je 0x7e3d
movq -0x140(%rbp), %rsi
incq %rsi
callq 0x2210
movslq %r14d, %r13
shlq $0x5, %r13
leaq -0x100(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%r15,%r13), %rsi
movq 0x8(%r15,%r13), %rdx
addq %rsi, %rdx
leaq -0x110(%rbp), %rdi
callq 0x31ec
leaq -0xe0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x632a(%rip), %rsi      # 0xe1a4
leaq 0x6325(%rip), %rdx      # 0xe1a6
leaq -0xf0(%rbp), %rdi
callq 0x328a
leaq -0x50(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x448f
addq %r13, %r15
leaq -0x50(%rbp), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2270
movq (%rbx), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x7ed4
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0xf0(%rbp), %rdi
cmpq %r12, %rdi
je 0x7eef
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x110(%rbp), %rdi
cmpq %r14, %rdi
je 0x811f
movq -0x100(%rbp), %rsi
jmp 0x8117
leaq -0x40(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x62e8(%rip), %rdx      # 0xe202
leaq -0x50(%rbp), %rdi
movq %rdx, %rsi
callq 0x328a
leaq 0xa0(%r15), %rdx
leaq -0x130(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xa180
movq 0xc0(%r15), %rsi
movq 0xc8(%r15), %rdx
leaq -0x130(%rbp), %rdi
callq 0x20b0
leaq -0x60(%rbp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x7f7b
movq %rdx, -0x70(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x60(%rbp)
jmp 0x7f83
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
leaq -0x70(%rbp), %r15
movq %rdx, 0x8(%r15)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x2270
movq (%r15), %rdi
cmpq %r13, %rdi
je 0x7fbe
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x120(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7fdd
movq -0x120(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0xc0(%rbp), %r12
movq %r12, -0x10(%r12)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0xd0(%rbp), %rdi
callq 0x31ec
leaq -0xd0(%rbp), %rdi
callq 0x2997
movl %eax, %r15d
movq -0xd0(%rbp), %rdi
cmpq %r12, %rdi
je 0x802a
movq -0xc0(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r15b, %r15b
je 0x8131
leaq -0x50(%rbp), %rsi
movq %r14, %rdi
callq 0xa1e4
leaq -0x80(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x31ec
leaq -0xa0(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x6134(%rip), %rsi      # 0xe1a4
leaq 0x612f(%rip), %rdx      # 0xe1a6
leaq -0xb0(%rbp), %rdi
callq 0x328a
leaq -0x70(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
movq -0x30(%rbp), %rcx
xorl %r8d, %r8d
callq 0x448f
movq %rbx, %r15
leaq -0x50(%rbp), %rsi
movq %r14, %rdi
callq 0xa1e4
leaq -0x70(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2270
movq (%rbx), %rdi
cmpq %r13, %rdi
je 0x80d3
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0xb0(%rbp), %rdi
cmpq %r12, %rdi
je 0x80ee
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x810a
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x811f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2210
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x9e98(%rip), %rdi      # 0x11fd0
leaq 0x60b3(%rip), %rsi      # 0xe1f2
callq 0x21f0
xorl %edi, %edi
callq 0x2260
movq %rax, -0x30(%rbp)
movq -0x70(%rbp), %rdi
cmpq %r13, %rdi
je 0x816d
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x816d
movq %rbx, %r15
movq %rax, -0x30(%rbp)
movq -0xb0(%rbp), %rdi
cmpq %r12, %rdi
je 0x8191
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x8191
movq %rbx, %r15
movq %rax, -0x30(%rbp)
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x825a
movq -0x80(%rbp), %rsi
jmp 0x81e9
movq %rbx, %r15
movq %rax, -0x30(%rbp)
movq -0xd0(%rbp), %rdi
cmpq %r12, %rdi
je 0x825a
movq -0xc0(%rbp), %rsi
jmp 0x81e9
movq %rbx, %r15
movq %rax, -0x30(%rbp)
leaq -0x120(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x825a
movq -0x120(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x825a
jmp 0x8253
movq %rax, -0x30(%rbp)
jmp 0x8288
jmp 0x8253
movq %rax, -0x30(%rbp)
movq -0xf0(%rbp), %rdi
cmpq %r12, %rdi
je 0x8225
movq -0xe0(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x8225
movq %rax, -0x30(%rbp)
movq -0x110(%rbp), %rdi
cmpq %r14, %rdi
je 0x8288
movq -0x100(%rbp), %rsi
jmp 0x8280
movq %rax, -0x30(%rbp)
movq -0x150(%rbp), %rdi
cmpq %r13, %rdi
je 0x8288
movq -0x140(%rbp), %rsi
jmp 0x8280
movq %rbx, %r15
movq %rax, -0x30(%rbp)
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0x8288
movq -0x40(%rbp), %rsi
jmp 0x8280
movq %rax, -0x30(%rbp)
movq -0x170(%rbp), %rdi
cmpq %rbx, %rdi
je 0x8288
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x30(%rbp), %rdi
callq 0x2320