// File: /workspace/github_cpp_makefile_star2_O3/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 0xc0c7
leal (%r11,%rdx), %eax
decl %eax
imull %edi, %eax
addl %ecx, %eax
cltq
movb (%r8,%rax), %bl
cmpb $0x40, %bl
jne 0xbf84
leal (%rdx,%r11), %eax
incl %eax
imull %edi, %eax
addl %ecx, %eax
movslq %eax, %r10
movl $0x1, %eax
cmpb $-0x40, (%r8,%r10)
je 0xc0c7
leal -0x1(%rdx), %r10d
leal -0x1(%rsi), %r15d
imull %r9d, %r15d
leal (%r15,%r10), %eax
imull %edi, %eax
addl %ecx, %eax
cltq
movb (%r8,%rax), %bpl
cmpb $0x40, %bpl
jne 0xbfc8
leal 0x1(%rsi), %eax
imull %r9d, %eax
addl %edx, %eax
incl %eax
imull %edi, %eax
addl %ecx, %eax
movslq %eax, %r14
movl $0x1, %eax
cmpb $-0x40, (%r8,%r14)
je 0xc0c7
leal (%r15,%rdx), %eax
imull %edi, %eax
addl %ecx, %eax
cltq
movb (%r8,%rax), %r14b
cmpb $0x40, %r14b
jne 0xbffe
leal 0x1(%rsi), %eax
imull %r9d, %eax
addl %edx, %eax
imull %edi, %eax
addl %ecx, %eax
movslq %eax, %r12
movl $0x1, %eax
cmpb $-0x40, (%r8,%r12)
je 0xc0c7
leal (%r15,%rdx), %eax
incl %eax
imull %edi, %eax
addl %ecx, %eax
cltq
movb (%r8,%rax), %r15b
cmpb $0x40, %r15b
jne 0xc037
leal 0x1(%rsi), %eax
imull %r9d, %eax
addl %r10d, %eax
imull %edi, %eax
addl %ecx, %eax
movslq %eax, %r12
movl $0x1, %eax
cmpb $-0x40, (%r8,%r12)
je 0xc0c7
leal 0x1(%rdx), %r12d
cmpb $-0x40, %bl
jne 0xc059
addl %r12d, %r11d
imull %edi, %r11d
addl %ecx, %r11d
movslq %r11d, %r11
movl $0x1, %eax
cmpb $0x40, (%r8,%r11)
je 0xc0c7
cmpb $-0x40, %bpl
jne 0xc07d
leal 0x1(%rsi), %eax
imull %r9d, %eax
addl %r12d, %eax
imull %edi, %eax
addl %ecx, %eax
movslq %eax, %r11
movl $0x1, %eax
cmpb $0x40, (%r8,%r11)
je 0xc0c7
cmpb $-0x40, %r14b
jne 0xc0a0
leal 0x1(%rsi), %eax
imull %r9d, %eax
addl %edx, %eax
imull %edi, %eax
addl %ecx, %eax
movslq %eax, %rdx
movl $0x1, %eax
cmpb $0x40, (%r8,%rdx)
je 0xc0c7
cmpb $-0x40, %r15b
jne 0xc0c5
incl %esi
imull %esi, %r9d
addl %r10d, %r9d
imull %edi, %r9d
addl %ecx, %r9d
movslq %r9d, %rcx
movl $0x1, %eax
cmpb $0x40, (%r8,%rcx)
je 0xc0c7
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq