// File: /workspace/github_cpp_makefile_star2_O2/rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::check_zero_crossing(Image&, int, int, int)
int ImageProc::check_zero_crossing(Image &img_modified_copy, int i, int j, int k)
{
	if(img_modified_copy.getvalue(i,j,k) != 128)
	{
	 	return (0);
	}
	else if(	(img_modified_copy.getvalue((i),(j-1),k) == 64 && img_modified_copy.getvalue((i),(j+1),k) == 192)
			||	(img_modified_copy.getvalue((i-1),(j-1),k) == 64 && img_modified_copy.getvalue((i+1),(j+1),k) == 192)
			||	(img_modified_copy.getvalue((i-1),(j),k) == 64 && img_modified_copy.getvalue((i+1),(j),k) == 192)
			||	(img_modified_copy.getvalue((i-1),(j+1),k) == 64 && img_modified_copy.getvalue((i+1),(j-1),k) == 192)
			||	(img_modified_copy.getvalue((i),(j-1),k) == 192 && img_modified_copy.getvalue((i),(j+1),k) == 64)
			||	(img_modified_copy.getvalue((i-1),(j-1),k) == 192 && img_modified_copy.getvalue((i+1),(j+1),k) == 64)
			||	(img_modified_copy.getvalue((i-1),(j),k) == 192 && img_modified_copy.getvalue((i+1),(j),k) == 64)
			||	(img_modified_copy.getvalue((i-1),(j+1),k) == 192 && img_modified_copy.getvalue((i+1),(j-1),k) == 64))
		return (1);
	else return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x18(%rdi), %r8
movl 0x8(%rdi), %r9d
movl 0x10(%rdi), %edi
movl %r9d, %r11d
imull %esi, %r11d
leal (%r11,%rdx), %eax
imull %edi, %eax
addl %ecx, %eax
movslq %eax, %r10
xorl %eax, %eax
cmpb (%r8,%r10), %al
jno 0xa6c1
leal (%r11,%rdx), %eax
decl %eax
imull %edi, %eax
addl %ecx, %eax
cltq
movb (%r8,%rax), %bl
movl $0x1, %eax
cmpb $0x40, %bl
jne 0xa587
leal (%rdx,%r11), %r10d
incl %r10d
imull %edi, %r10d
addl %ecx, %r10d
movslq %r10d, %r10
cmpb $-0x40, (%r8,%r10)
je 0xa6c1
leal -0x1(%rdx), %r10d
leal -0x1(%rsi), %r15d
imull %r9d, %r15d
leal (%r15,%r10), %ebp
imull %edi, %ebp
addl %ecx, %ebp
movslq %ebp, %r14
movb (%r8,%r14), %bpl
cmpb $0x40, %bpl
jne 0xa5cc
leal 0x1(%rsi), %r14d
imull %r9d, %r14d
addl %edx, %r14d
incl %r14d
imull %edi, %r14d
addl %ecx, %r14d
movslq %r14d, %r14
cmpb $-0x40, (%r8,%r14)
je 0xa6c1
leal (%r15,%rdx), %r14d
imull %edi, %r14d
addl %ecx, %r14d
movslq %r14d, %r14
movb (%r8,%r14), %r14b
cmpb $0x40, %r14b
jne 0xa604
leal 0x1(%rsi), %r12d
imull %r9d, %r12d
addl %edx, %r12d
imull %edi, %r12d
addl %ecx, %r12d
movslq %r12d, %r12
cmpb $-0x40, (%r8,%r12)
je 0xa6c1
addl %edx, %r15d
incl %r15d
imull %edi, %r15d
addl %ecx, %r15d
movslq %r15d, %r15
movb (%r8,%r15), %r15b
cmpb $0x40, %r15b
jne 0xa63e
leal 0x1(%rsi), %r12d
imull %r9d, %r12d
addl %r10d, %r12d
imull %edi, %r12d
addl %ecx, %r12d
movslq %r12d, %r12
cmpb $-0x40, (%r8,%r12)
je 0xa6c1
leal 0x1(%rdx), %r12d
cmpb $-0x40, %bl
jne 0xa65b
addl %r12d, %r11d
imull %edi, %r11d
addl %ecx, %r11d
movslq %r11d, %r11
cmpb $0x40, (%r8,%r11)
je 0xa6c1
cmpb $-0x40, %bpl
jne 0xa67d
leal 0x1(%rsi), %r11d
imull %r9d, %r11d
addl %r12d, %r11d
imull %edi, %r11d
addl %ecx, %r11d
movslq %r11d, %r11
cmpb $0x40, (%r8,%r11)
je 0xa6c1
cmpb $-0x40, %r14b
jne 0xa69f
leal 0x1(%rsi), %r11d
imull %r9d, %r11d
addl %edx, %r11d
imull %edi, %r11d
addl %ecx, %r11d
movslq %r11d, %rdx
cmpb $0x40, (%r8,%rdx)
je 0xa6c1
cmpb $-0x40, %r15b
jne 0xa6bf
incl %esi
imull %esi, %r9d
addl %r10d, %r9d
imull %edi, %r9d
addl %ecx, %r9d
movslq %r9d, %rcx
cmpb $0x40, (%r8,%rcx)
je 0xa6c1
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq