// File: 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:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl %edx, 0x54(%rsp)
movl %ecx, 0x50(%rsp)
movl %r8d, 0x4c(%rsp)
movq 0x58(%rsp), %rdi
movl 0x50(%rsp), %esi
movl 0x54(%rsp), %edx
subl $0x1, %edx
callq 0x131b0
movw %ax, 0x4a(%rsp)
movq 0x58(%rsp), %rdi
movl 0x50(%rsp), %esi
subl $0x1, %esi
movl 0x54(%rsp), %edx
callq 0x131b0
movw %ax, 0x48(%rsp)
movq 0x58(%rsp), %rdi
movl 0x50(%rsp), %esi
subl $0x1, %esi
movl 0x54(%rsp), %edx
subl $0x1, %edx
callq 0x131b0
movw %ax, 0x46(%rsp)
movq 0x58(%rsp), %rdi
movl 0x50(%rsp), %esi
subl $0x1, %esi
movl 0x54(%rsp), %edx
addl $0x1, %edx
callq 0x131b0
movw %ax, 0x44(%rsp)
movq 0x58(%rsp), %rdi
movl 0x50(%rsp), %esi
movl 0x54(%rsp), %edx
subl $0x2, %edx
callq 0x131b0
movw %ax, 0x42(%rsp)
movq 0x58(%rsp), %rdi
movl 0x50(%rsp), %esi
subl $0x2, %esi
movl 0x54(%rsp), %edx
callq 0x131b0
movw %ax, 0x40(%rsp)
movswl 0x48(%rsp), %edi
callq 0x1cf80
cwtl
movl %eax, 0xc(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
movswl 0x4a(%rsp), %edi
callq 0x1cf80
cwtl
movl %eax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x10(%rsp), %ecx
movl %ecx, (%rax)
movswl 0x48(%rsp), %edi
callq 0x1f6a0
cwtl
movl %eax, 0x14(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x14(%rsp), %ecx
movl %ecx, (%rax)
movswl 0x4a(%rsp), %edi
callq 0x1f6a0
cwtl
movl %eax, 0x18(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x18(%rsp), %ecx
movl %ecx, (%rax)
movl 0x50(%rsp), %eax
movl %eax, 0x1c(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x1c(%rsp), %ecx
movl %ecx, (%rax)
movl 0x54(%rsp), %eax
movl %eax, 0x20(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x20(%rsp), %ecx
movl %ecx, (%rax)
movswl 0x4a(%rsp), %eax
movswl 0x48(%rsp), %ecx
addl %ecx, %eax
movswl 0x46(%rsp), %ecx
subl %ecx, %eax
movl %eax, 0x24(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x24(%rsp), %ecx
movl %ecx, (%rax)
movswl 0x46(%rsp), %eax
movswl 0x44(%rsp), %ecx
addl %ecx, %eax
movswl 0x48(%rsp), %ecx
subl %ecx, %eax
movl %eax, 0x28(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x28(%rsp), %ecx
movl %ecx, (%rax)
movswl 0x4a(%rsp), %eax
movswl 0x46(%rsp), %ecx
subl %ecx, %eax
movswl %ax, %edi
callq 0x1f6a0
cwtl
movl %eax, 0x2c(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x2c(%rsp), %ecx
movl %ecx, (%rax)
movswl 0x46(%rsp), %eax
movswl 0x48(%rsp), %ecx
subl %ecx, %eax
movswl %ax, %edi
callq 0x1f6a0
cwtl
movl %eax, 0x30(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x30(%rsp), %ecx
movl %ecx, (%rax)
movswl 0x48(%rsp), %eax
movswl 0x44(%rsp), %ecx
subl %ecx, %eax
movswl %ax, %edi
callq 0x1f6a0
cwtl
movl %eax, 0x34(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x34(%rsp), %ecx
movl %ecx, (%rax)
movswl 0x48(%rsp), %eax
movswl 0x40(%rsp), %ecx
subl %ecx, %eax
movswl %ax, %edi
callq 0x1f6a0
cwtl
movl %eax, 0x38(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x38(%rsp), %ecx
movl %ecx, (%rax)
movswl 0x4a(%rsp), %eax
movswl 0x42(%rsp), %ecx
subl %ecx, %eax
movswl %ax, %edi
callq 0x1f6a0
cwtl
movl %eax, 0x3c(%rsp)
movq 0x60(%rsp), %rdi
movl 0x4c(%rsp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x4c(%rsp)
movslq %eax, %rsi
callq 0x12190
movl 0x3c(%rsp), %ecx
movl %ecx, (%rax)
movq 0x58(%rsp), %rax
movw 0x24(%rax), %ax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)