// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r15d
movq %rdi, %r14
movl 0x18(%rsi), %eax
movq %rsi, %r9
movq %rsi, 0x20(%rsp)
movq %rcx, %rdi
movq %rcx, 0x10(%rsp)
decl %ecx
imull %eax, %ecx
leal -0x2(%rdi), %edx
imull %eax, %edx
movl %eax, %esi
imull %edi, %esi
leal (%rsi,%r15), %eax
decl %eax
movslq %eax, %rdi
movq (%r9), %rax
movswl (%rax,%rdi,2), %ebp
leal (%rcx,%r15), %edi
movslq %edi, %rdi
movswl (%rax,%rdi,2), %r13d
leal -0x1(%rcx,%r15), %edi
movslq %edi, %rdi
movswl (%rax,%rdi,2), %r12d
leal 0x1(%rcx,%r15), %ecx
movslq %ecx, %rcx
movswl (%rax,%rcx,2), %ecx
movq %rcx, 0x18(%rsp)
leal (%r15,%rsi), %ecx
addl $-0x2, %ecx
movslq %ecx, %rcx
addl %r15d, %edx
movslq %edx, %rdx
movslq %r8d, %rbx
movq (%r14), %rsi
movd %r13d, %xmm0
pinsrw $0x1, %ebp, %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
movzwl (%rax,%rdx,2), %edx
movl %r13d, %edi
subw %dx, %di
movw %di, 0xc(%rsp)
movzwl (%rax,%rcx,2), %eax
movl %ebp, %ecx
subw %ax, %cx
movw %cx, 0xe(%rsp)
movq %xmm1, (%rsi,%rbx,4)
movl %r13d, %edi
callq 0x43c8
cwtl
movq (%r14), %rcx
movl %eax, 0x8(%rcx,%rbx,4)
movl %ebp, %edi
callq 0x43c8
cwtl
movq (%r14), %rcx
movl %eax, 0xc(%rcx,%rbx,4)
movq 0x10(%rsp), %rax
movl %eax, 0x10(%rcx,%rbx,4)
movl %r15d, 0x14(%rcx,%rbx,4)
leal (%r13,%rbp), %eax
subl %r12d, %eax
movl %eax, 0x18(%rcx,%rbx,4)
subl %r12d, %ebp
subl %r13d, %r12d
movq 0x18(%rsp), %r15
leal (%r12,%r15), %eax
movl %eax, 0x1c(%rcx,%rbx,4)
movswl %bp, %edi
callq 0x43c8
cwtl
movq (%r14), %rcx
movl %eax, 0x20(%rcx,%rbx,4)
movswl %r12w, %edi
callq 0x43c8
cwtl
movq (%r14), %rcx
movl %eax, 0x24(%rcx,%rbx,4)
subl %r15d, %r13d
movswl %r13w, %edi
callq 0x43c8
cwtl
movq (%r14), %rcx
movl %eax, 0x28(%rcx,%rbx,4)
movswl 0xc(%rsp), %edi
callq 0x43c8
cwtl
movq (%r14), %rcx
movl %eax, 0x2c(%rcx,%rbx,4)
movswl 0xe(%rsp), %edi
callq 0x43c8
cwtl
movq (%r14), %rcx
movl %eax, 0x30(%rcx,%rbx,4)
movq 0x20(%rsp), %rax
movzwl 0x24(%rax), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq