// File: /workspace/github_c_makefile_star2_O0/yui0[P]img2vec/./imgp.h
// Function: imgp_dilate
void imgp_dilate(uint8_t *s, int w, int h, int bpp, uint8_t *p)
{
	for (int y=1; y<h-1; y++) {
		for (int x=1; x<w-1; x++) {
			for (int b=0; b<bpp; b++) {
				uint8_t uc = s[ ((y+0)*w + (x+0))*bpp+b ]; // centre
				uint8_t ua = s[ ((y-1)*w + (x+0))*bpp+b ]; // above
				uint8_t ub = s[ ((y+1)*w + (x+0))*bpp+b ]; // below
				uint8_t ul = s[ ((y+0)*w + (x-1))*bpp+b ]; // left
				uint8_t ur = s[ ((y+0)*w + (x+1))*bpp+b ]; // right

				uint8_t ux = 0;
				if (uc > ux) ux = uc;
				if (ua > ux) ux = ua;
				if (ub > ux) ux = ub;
				if (ul > ux) ux = ul;
				if (ur > ux) ux = ur;
				p[ (y*w + x)*bpp+b ] = ux;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl -0x10(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x7520
movl $0x1, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x7510
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x7500
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x0, %ecx
imull -0xc(%rbp), %ecx
movl -0x28(%rbp), %edx
addl $0x0, %edx
addl %edx, %ecx
imull -0x14(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x2d(%rbp)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
imull -0xc(%rbp), %ecx
movl -0x28(%rbp), %edx
addl $0x0, %edx
addl %edx, %ecx
imull -0x14(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x2e(%rbp)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
imull -0xc(%rbp), %ecx
movl -0x28(%rbp), %edx
addl $0x0, %edx
addl %edx, %ecx
imull -0x14(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x2f(%rbp)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x0, %ecx
imull -0xc(%rbp), %ecx
movl -0x28(%rbp), %edx
subl $0x1, %edx
addl %edx, %ecx
imull -0x14(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x30(%rbp)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
addl $0x0, %ecx
imull -0xc(%rbp), %ecx
movl -0x28(%rbp), %edx
addl $0x1, %edx
addl %edx, %ecx
imull -0x14(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %al
movb %al, -0x31(%rbp)
movb $0x0, -0x32(%rbp)
movzbl -0x2d(%rbp), %eax
movzbl -0x32(%rbp), %ecx
cmpl %ecx, %eax
jle 0x748c
movb -0x2d(%rbp), %al
movb %al, -0x32(%rbp)
movzbl -0x2e(%rbp), %eax
movzbl -0x32(%rbp), %ecx
cmpl %ecx, %eax
jle 0x749e
movb -0x2e(%rbp), %al
movb %al, -0x32(%rbp)
movzbl -0x2f(%rbp), %eax
movzbl -0x32(%rbp), %ecx
cmpl %ecx, %eax
jle 0x74b0
movb -0x2f(%rbp), %al
movb %al, -0x32(%rbp)
movzbl -0x30(%rbp), %eax
movzbl -0x32(%rbp), %ecx
cmpl %ecx, %eax
jle 0x74c2
movb -0x30(%rbp), %al
movb %al, -0x32(%rbp)
movzbl -0x31(%rbp), %eax
movzbl -0x32(%rbp), %ecx
cmpl %ecx, %eax
jle 0x74d4
movb -0x31(%rbp), %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %dl
movq -0x20(%rbp), %rax
movl -0x24(%rbp), %ecx
imull -0xc(%rbp), %ecx
addl -0x28(%rbp), %ecx
imull -0x14(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x73ac
jmp 0x7502
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x7394
jmp 0x7512
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x737c
popq %rbp
retq
nopw %cs:(%rax,%rax)