// File: /workspace/github_cpp_makefile_star2_O1/sthapliyal37[P]Microprocessor_8085_Updated/Branch.cpp
// Function: JNC(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*)
string JNC(string instruction,string pc,string* registers,bool* flag){

	if(flag[0] == false)
		return instruction;
	else{
		
		string resultant = "";
		int value16bit[4];
		int returnValue[] = {0,0,0,3};
		int carry = 0;
		hexToDecimal(pc,value16bit);	  
		for(int i = 3;i>=0;i--){
					
			int value = value16bit[i] + returnValue[i] + carry;
			carry = value / 16;
			value = value % 16;
			if(value>=0 && value<=9)
				resultant = (char)('0' + value) + resultant;
			else{
				resultant = (char)('A' + (value-10)) + resultant;
			}
		}
		if(validityAddress(resultant))
			return resultant;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rdx
cmpb $0x0, (%r8)
movq %rdx, (%rdi)
je 0xafaa
movq %rdx, -0x30(%rbp)
leaq 0x3391(%rip), %rdx      # 0xe202
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x32be
leaq -0x80(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x90(%rbp), %rdi
callq 0x3224
leaq -0x90(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x475e
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0xaec5
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2210
xorl %r13d, %r13d
movl $0x3, %r15d
leaq 0x336b(%rip), %r12      # 0xe240
leaq -0x70(%rbp), %r14
movl (%r12,%r15,4), %ecx
addl -0xa0(%rbp,%r15,4), %r13d
movl %r13d, %eax
addl %ecx, %eax
leal 0xf(%rcx,%r13), %r13d
cmovnsl %eax, %r13d
movl %r13d, %ecx
andl $-0x10, %ecx
subl %ecx, %eax
cmpl $0x9, %eax
ja 0xaf12
orb $0x30, %al
movsbl %al, %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4c11
jmp 0xaf22
addb $0x37, %al
movsbl %al, %esi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x4c11
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2270
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0xaf46
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2210
sarl $0x4, %r13d
addq $-0x1, %r15
jb 0xaed9
leaq -0x40(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x3224
leaq -0x50(%rbp), %rdi
callq 0x2991
movl %eax, %r14d
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0xaf8c
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x2210
testb %r14b, %r14b
movq -0x30(%rbp), %rax
jne 0xafdf
movq (%rbx), %rdi
cmpq %rax, %rdi
je 0xafdf
movq (%rax), %rsi
incq %rsi
callq 0x2210
jmp 0xafdf
movq (%rsi), %rcx
leaq 0x10(%rsi), %rax
cmpq %rax, %rcx
je 0xafc2
movq %rcx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0xafc8
movups (%rax), %xmm0
movups %xmm0, (%rdx)
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%rsi)
movq $0x0, 0x8(%rsi)
movb $0x0, 0x10(%rsi)
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0xb027
movq -0x40(%rbp), %rsi
jmp 0xb016
movq %rax, %r14
movq -0x90(%rbp), %rdi
cmpq %r15, %rdi
je 0xb027
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0xb027
jmp 0xb024
jmp 0xb024
movq %rax, %r14
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0xb03f
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2210
movq %r14, %rdi
callq 0x2320