// File: /workspace/github_cpp_makefile_star2_O1/cloudinary[P]fuif/encoding/context_predict.h
// Function: predict_and_compute_properties_no_edge_case(std::vector<int, std::allocator<int>>&, Channel const&, int, int, int)
pixel_type predict_and_compute_properties_no_edge_case(Properties &p, const Channel &ch, int x, int y, int offset) {
    assert(x>1);
    assert(y>1);
    assert(x+1<ch.w);

    pixel_type left = ch.value_nocheck(y,x-1);
    pixel_type top = ch.value_nocheck(y-1,x);
    pixel_type topleft = ch.value_nocheck(y-1,x-1);
    pixel_type topright = ch.value_nocheck(y-1,x+1);

      pixel_type leftleft = ch.value_nocheck(y,x-2);
      pixel_type toptop = ch.value_nocheck(y-2,x);

      // neighbors
      p[offset++] = fooabs(top);
      p[offset++] = fooabs(left);
      p[offset++] = slog(top);
      p[offset++] = slog(left);

      // location
      p[offset++] = y;
      p[offset++] = x;

      // local gradients
      p[offset++] = left+top-topleft;
      p[offset++] = topleft+topright-top;

      // FFV1 context properties
      p[offset++] = slog(left-topleft);
      p[offset++] = slog(topleft-top);
      p[offset++] = slog(top-topright);
      p[offset++] = slog(top-toptop);
      p[offset++] = slog(left-leftleft);

    return ch.zero;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x18(%rsi), %eax
leal -0x1(%rcx), %r10d
imull %eax, %r10d
leal -0x2(%rcx), %ebx
imull %eax, %ebx
imull %ecx, %eax
leal (%rax,%rdx), %r9d
decl %r9d
movslq %r9d, %r9
movq (%rsi), %r12
movswl (%r12,%r9,2), %r9d
leal (%r10,%rdx), %r11d
movslq %r11d, %r11
movswl (%r12,%r11,2), %r11d
addl %edx, %ebx
xorl %r15d, %r15d
leal (%r10,%rdx), %ebp
decl %ebp
movslq %ebp, %r14
movswl (%r12,%r14,2), %r14d
leal 0x1(%r10,%rdx), %r10d
movslq %r10d, %r10
movswl (%r12,%r10,2), %ebp
leal -0x2(%rdx,%rax), %eax
cltq
movzwl (%r12,%rax,2), %r10d
movslq %ebx, %rax
movzwl (%r12,%rax,2), %ebx
movslq %r8d, %rax
movq (%rdi), %rdi
movd %r11d, %xmm0
pinsrw $0x1, %r9d, %xmm0
pxor %xmm1, %xmm1
xorps %xmm2, %xmm2
movss %xmm0, %xmm2            # xmm2 = xmm0[0],xmm2[1,2,3]
pshuflw $0x60, %xmm2, %xmm0     # xmm0 = xmm2[0,0,2,1,4,5,6,7]
psubw %xmm0, %xmm1
pmaxsw %xmm0, %xmm1
psrad $0x10, %xmm1
movq %xmm1, (%rdi,%rax,4)
movl $0x0, %r8d
testl %r11d, %r11d
je 0x551e
testw %r11w, %r11w
jle 0x550d
bsrl %r11d, %r8d
xorl $-0x20, %r8d
addl $0x21, %r8d
jmp 0x551e
movl %r11d, %r8d
negl %r8d
bsrl %r8d, %r8d
notl %r8d
orl $-0x20, %r8d
movl %r8d, 0x8(%rdi,%rax,4)
testw %r9w, %r9w
je 0x554e
testw %r9w, %r9w
jle 0x553d
bsrl %r9d, %r15d
xorl $-0x20, %r15d
addl $0x21, %r15d
jmp 0x554e
movl %r9d, %r8d
negl %r8d
bsrl %r8d, %r15d
notl %r15d
orl $-0x20, %r15d
movl %r15d, 0xc(%rdi,%rax,4)
movl %ecx, 0x10(%rdi,%rax,4)
movl %edx, 0x14(%rdi,%rax,4)
movl %r9d, %ecx
addl %r11d, %ecx
subl %r14d, %ecx
movl %ecx, 0x18(%rdi,%rax,4)
movl %r14d, %ecx
subl %r11d, %ecx
addl %ebp, %ecx
movl %ecx, 0x1c(%rdi,%rax,4)
xorl %ecx, %ecx
movl %r9d, %r8d
movl $0x0, %edx
subw %r14w, %r8w
je 0x55a2
movswl %r8w, %edx
testw %dx, %dx
jle 0x5598
bsrl %edx, %edx
xorl $-0x20, %edx
addl $0x21, %edx
jmp 0x55a2
negl %edx
bsrl %edx, %edx
notl %edx
orl $-0x20, %edx
movl %edx, 0x20(%rdi,%rax,4)
subw %r11w, %r14w
je 0x55ca
movswl %r14w, %ecx
testw %cx, %cx
jle 0x55c0
bsrl %ecx, %ecx
xorl $-0x20, %ecx
addl $0x21, %ecx
jmp 0x55ca
negl %ecx
bsrl %ecx, %ecx
notl %ecx
orl $-0x20, %ecx
movl %ecx, 0x24(%rdi,%rax,4)
xorl %ecx, %ecx
movl %r11d, %r8d
movl $0x0, %edx
subw %bp, %r8w
je 0x55fc
movswl %r8w, %edx
testw %dx, %dx
jle 0x55f2
bsrl %edx, %edx
xorl $-0x20, %edx
addl $0x21, %edx
jmp 0x55fc
negl %edx
bsrl %edx, %edx
notl %edx
orl $-0x20, %edx
movl %edx, 0x28(%rdi,%rax,4)
subw %bx, %r11w
je 0x5624
movswl %r11w, %ecx
testw %cx, %cx
jle 0x561a
bsrl %ecx, %ecx
xorl $-0x20, %ecx
addl $0x21, %ecx
jmp 0x5624
negl %ecx
bsrl %ecx, %ecx
notl %ecx
orl $-0x20, %ecx
movl %ecx, 0x2c(%rdi,%rax,4)
xorl %ecx, %ecx
subw %r10w, %r9w
je 0x564e
movswl %r9w, %ecx
testw %cx, %cx
jle 0x5644
bsrl %ecx, %ecx
xorl $-0x20, %ecx
addl $0x21, %ecx
jmp 0x564e
negl %ecx
bsrl %ecx, %ecx
notl %ecx
orl $-0x20, %ecx
movl %ecx, 0x30(%rdi,%rax,4)
movzwl 0x24(%rsi), %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop