// File: /workspace/github_cpp_makefile_star2_O1/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 0x8dae
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 0x3224
movq %r15, %rdi
callq 0x265c
movl %eax, %r15d
movq -0x188(%rbp), %rdi
cmpq %r12, %rdi
je 0x888e
movq -0x178(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r15b, %r15b
je 0x8dae
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 0x3224
movq %r14, %rdi
callq 0x2778
movl %eax, %r14d
movq -0x168(%rbp), %rdi
cmpq %r15, %rdi
je 0x88e1
movq -0x158(%rbp), %rsi
incq %rsi
callq 0x2210
cmpl $0x5, %r14d
ja 0x8dae
movl $0x2a, %eax
btl %r14d, %eax
jae 0x8dae
leaq -0xd8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x58f6(%rip), %rdx      # 0xe202
leaq -0xe8(%rbp), %rdi
movq %rdx, %rsi
callq 0x32be
leaq -0x78(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x58d8(%rip), %rdx      # 0xe202
leaq -0x88(%rbp), %rdi
movq %rdx, %rsi
callq 0x32be
leaq -0xb8(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x58b7(%rip), %rdx      # 0xe202
leaq -0xc8(%rbp), %rdi
movq %rdx, %rsi
callq 0x32be
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x5896(%rip), %rdx      # 0xe202
leaq -0xa8(%rbp), %rdi
movq %rdx, %rsi
callq 0x32be
movl %r14d, %r15d
shlq $0x5, %r15
leaq -0x138(%rbp), %r12
movq %r12, -0x10(%r12)
movq (%rbx,%r15), %rsi
movq 0x8(%rbx,%r15), %rdx
addq %rsi, %rdx
leaq -0x148(%rbp), %rdi
callq 0x3224
leaq -0x148(%rbp), %rdi
callq 0x294d
movl %eax, %r14d
addq %r15, %rbx
testb %al, %al
je 0x89ef
leaq -0x118(%rbp), %r13
movq %r13, -0x10(%r13)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
addq %rsi, %rdx
leaq -0x128(%rbp), %rdi
callq 0x3224
leaq -0x128(%rbp), %rdi
callq 0x294d
movl %eax, %r15d
jmp 0x89f2
xorl %r15d, %r15d
testb %r14b, %r14b
je 0x8a16
leaq -0x118(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8a16
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
je 0x8a31
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r15b, %r15b
je 0x8dc0
leaq -0x48(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
movq %rbx, %rdx
callq 0xa216
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
leaq -0x48(%rbp), %rdi
callq 0x20b0
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8a82
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x8a89
movups (%rcx), %xmm0
movups %xmm0, (%r15)
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 %r15, %rdi
je 0x8ac7
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x38(%rbp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x8ae1
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0xf8(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
addq %rsi, %rdx
leaq -0x108(%rbp), %rdi
callq 0x3224
leaq -0x68(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x4108
leaq -0x88(%rbp), %rdi
movq %r14, %rsi
callq 0x2270
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x8b3c
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0x8b57
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x88(%rbp), %rax
movb (%rax), %r14b
leaq -0x48(%rbp), %rdi
movq %r12, (%rdi)
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
addq %rsi, %rdx
callq 0x3224
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 %r15, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8bd6
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x8bdd
movups (%rcx), %xmm0
movups %xmm0, (%r15)
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 %r15, %rdi
je 0x8c1b
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x8c30
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x88(%rbp), %rax
movb 0x2(%rax), %r14b
leaq -0x48(%rbp), %rdi
movq %r12, (%rdi)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
addq %rsi, %rdx
callq 0x3224
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 %r15, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8cb0
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x8cb7
movups (%rcx), %xmm0
movups %xmm0, (%r15)
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 %r15, %rdi
je 0x8cf5
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x8d0a
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 0x8d4e
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x8d70
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x8d8c
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x8dae
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 0x9209(%rip), %rdi      # 0x11fd0
leaq 0x542c(%rip), %rsi      # 0xe1fa
callq 0x21f0
xorl %edi, %edi
callq 0x2260
movq %rax, %rbx
movq -0x128(%rbp), %rdi
cmpq %r13, %rdi
je 0x8ea1
movq -0x118(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x8ea1
jmp 0x8e0c
jmp 0x8e0c
jmp 0x8eda
jmp 0x8e0c
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
jne 0x8e57
jmp 0x8edd
jmp 0x8eda
movq %rax, %rbx
movq -0x108(%rbp), %rdi
cmpq %r13, %rdi
je 0x8edd
movq -0xf8(%rbp), %rsi
jmp 0x8eb4
jmp 0x8eda
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8edd
movq -0x38(%rbp), %rsi
jmp 0x8eb4
jmp 0x8eda
movq %rax, %rbx
jmp 0x8eff
movq %rax, %rbx
jmp 0x8f21
movq %rax, %rbx
jmp 0x8f3d
movq %rax, %rbx
jmp 0x8f5f
movq %rax, %rbx
movq -0x168(%rbp), %rdi
cmpq %r15, %rdi
je 0x8f5f
movq -0x158(%rbp), %rsi
jmp 0x8f57
movq %rax, %rbx
movq -0x148(%rbp), %rdi
cmpq %r12, %rdi
je 0x8edd
movq -0x138(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x8edd
movq %rax, %rbx
movq -0x188(%rbp), %rdi
cmpq %r12, %rdi
je 0x8f5f
movq -0x178(%rbp), %rsi
jmp 0x8f57
movq %rax, %rbx
movq -0xa8(%rbp), %rdi
leaq -0x98(%rbp), %rax
cmpq %rax, %rdi
je 0x8eff
movq -0x98(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0xc8(%rbp), %rdi
leaq -0xb8(%rbp), %rax
cmpq %rax, %rdi
je 0x8f21
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x8f3d
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x8f5f
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x2320