// File: /workspace/github_cpp_makefile_star2_O3/sthapliyal37[P]Microprocessor_8085_Updated/arithmetic.cpp
// Function: INX(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*)
void INX(string instruction,string* registers,bool* flag)
{
int length = instruction.length();
	if(length == 1){
	
		if(validityRegisters(instruction)){
			
			int registerID = registerNumber(instruction);
			if(registerID == 1 || registerID == 3 || registerID == 5){
			
				string data16bit = "";
				string temporary = "";	
				string s1 = "";
				string s2 = "";
				if(validityData(registers[registerID]) == true && validityData(registers[registerID+1]) == true){
					
					data16bit = data16bit + registers[registerID] + registers[registerID + 1];
					temporary = increaseAddress(data16bit);
					 s1 = s1 + temporary[0] + temporary[1];		
					 s2 = s2 + temporary[2] + temporary[3];
					 registers[registerID] = s1; 
					 registers[registerID+1] = s2;
				}
				else{
					
					cout<<"Error: \n";
					exit(0);
				}
			}
			}
			}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq 0x8(%rdi), %rdx
cmpl $0x1, %edx
jne 0x8d51
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x178(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rdi), %rsi
addq %rsi, %rdx
leaq -0x188(%rbp), %r15
movq %r15, %rdi
callq 0x31ec
movq %r15, %rdi
callq 0x265c
movl %eax, %r15d
movq -0x188(%rbp), %rdi
cmpq %r12, %rdi
je 0x883a
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r15b, %r15b
je 0x8d51
leaq -0x158(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x168(%rbp), %r14
movq %r14, %rdi
callq 0x31ec
movq %r14, %rdi
callq 0x2778
movl %eax, %r14d
movq -0x168(%rbp), %rdi
cmpq %r15, %rdi
je 0x888d
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x2210
cmpl $0x5, %r14d
ja 0x8d51
movl $0x2a, %eax
btl %r14d, %eax
jae 0x8d51
leaq -0xd8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x594a(%rip), %rdx      # 0xe202
leaq -0xe8(%rbp), %rdi
movq %rdx, %rsi
callq 0x328a
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x592c(%rip), %rdx      # 0xe202
leaq -0x88(%rbp), %rdi
movq %rdx, %rsi
callq 0x328a
leaq -0xb8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x590b(%rip), %rdx      # 0xe202
leaq -0xc8(%rbp), %rdi
movq %rdx, %rsi
callq 0x328a
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x58ea(%rip), %rdx      # 0xe202
leaq -0xa8(%rbp), %rdi
movq %rdx, %rsi
callq 0x328a
movl %r14d, %r14d
shlq $0x5, %r14
leaq -0x138(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rbx,%r14), %rsi
movq 0x8(%rbx,%r14), %rdx
addq %rsi, %rdx
leaq -0x148(%rbp), %rdi
callq 0x31ec
leaq -0x148(%rbp), %rdi
callq 0x294d
addq %r14, %rbx
testb %al, %al
je 0x89b3
leaq -0x118(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
leaq -0x128(%rbp), %rdi
callq 0x31ec
leaq -0x128(%rbp), %rdi
callq 0x294d
movl %eax, %r14d
movq -0x128(%rbp), %rdi
cmpq %r15, %rdi
je 0x89b6
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x89b6
xorl %r14d, %r14d
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
je 0x89d1
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r14b, %r14b
je 0x8d63
leaq -0x48(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
movq %rbx, %rdx
callq 0xa180
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
leaq -0x48(%rbp), %rdi
callq 0x20b0
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8a23
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x8a2b
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq -0x68(%rbp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xe8(%rbp), %rdi
movq %r14, %rsi
callq 0x2270
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x8a69
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x8a82
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0xf8(%rbp), %r15
movq %r15, -0x10(%r15)
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x108(%rbp), %rdi
callq 0x31ec
leaq -0x68(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x407c
leaq -0x88(%rbp), %rdi
movq %r14, %rsi
callq 0x2270
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x8add
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x108(%rbp), %rdi
cmpq %r15, %rdi
je 0x8af8
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x88(%rbp), %rax
movb (%rax), %r14b
leaq -0x48(%rbp), %rdi
movq %r13, (%rdi)
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
addq %rsi, %rdx
callq 0x31ec
leaq -0x48(%rbp), %rdi
movq 0x8(%rdi), %rsi
movsbl %r14b, %r8d
movl $0x1, %ecx
xorl %edx, %edx
callq 0x2360
movq -0x88(%rbp), %rax
movsbl 0x1(%rax), %r8d
leaq -0x48(%rbp), %rdi
movq 0x8(%rdi), %rsi
movl $0x1, %ecx
xorl %edx, %edx
callq 0x2360
movq %r12, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8b77
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x8b7f
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq -0x68(%rbp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xc8(%rbp), %rdi
movq %r14, %rsi
callq 0x2270
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x8bbd
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x8bd2
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x88(%rbp), %rax
movb 0x2(%rax), %r14b
leaq -0x48(%rbp), %rdi
movq %r13, (%rdi)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
callq 0x31ec
leaq -0x48(%rbp), %rdi
movq 0x8(%rdi), %rsi
movsbl %r14b, %r8d
movl $0x1, %ecx
xorl %edx, %edx
callq 0x2360
movq -0x88(%rbp), %rax
movsbl 0x3(%rax), %r8d
leaq -0x48(%rbp), %rdi
movq 0x8(%rdi), %rsi
movl $0x1, %ecx
xorl %edx, %edx
callq 0x2360
movq %r12, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8c52
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x8c5a
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq -0x68(%rbp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0xa8(%rbp), %rdi
movq %r14, %rsi
callq 0x2270
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x8c98
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x8cad
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0xc8(%rbp), %rsi
movq %rbx, %rdi
callq 0x2110
addq $0x20, %rbx
leaq -0xa8(%rbp), %rsi
movq %rbx, %rdi
callq 0x2110
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x8cf1
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x8d13
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x8d2f
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x8d51
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2210
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x9266(%rip), %rdi      # 0x11fd0
leaq 0x5489(%rip), %rsi      # 0xe1fa
callq 0x21f0
xorl %edi, %edi
callq 0x2260
movq %rax, %rbx
movq -0x128(%rbp), %rdi
cmpq %r15, %rdi
je 0x8e44
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x8e44
jmp 0x8daf
jmp 0x8daf
jmp 0x8e7d
jmp 0x8daf
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
jne 0x8dfa
jmp 0x8e80
jmp 0x8e7d
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r15, %rdi
je 0x8e80
movq -0xf8(%rbp), %rsi
jmp 0x8e57
jmp 0x8e7d
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8e80
movq -0x38(%rbp), %rsi
jmp 0x8e57
jmp 0x8e7d
movq %rax, %rbx
jmp 0x8ea2
movq %rax, %rbx
jmp 0x8ec4
movq %rax, %rbx
jmp 0x8ee0
movq %rax, %rbx
jmp 0x8f02
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r15, %rdi
je 0x8f02
movq -0x158(%rbp), %rsi
jmp 0x8efa
movq %rax, %rbx
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
je 0x8e80
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x8e80
movq %rax, %rbx
movq -0x188(%rbp), %rdi
cmpq %r12, %rdi
je 0x8f02
movq -0x178(%rbp), %rsi
jmp 0x8efa
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x8ea2
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x8ec4
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x8ee0
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x8f02
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2320