// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/filters_sse2.c
// Function: DoGradientFilter_SSE2
static WEBP_INLINE void DoGradientFilter_SSE2(const uint8_t* in,
                                              int width, int height, int stride,
                                              int row, int num_rows,
                                              uint8_t* out) {
  const size_t start_offset = row * stride;
  const int last_row = row + num_rows;
  DCHECK(in, out);
  in += start_offset;
  out += start_offset;

  // left prediction for top scan-line
  if (row == 0) {
    out[0] = in[0];
    PredictLineLeft_SSE2(in + 1, out + 1, width - 1);
    row = 1;
    in += stride;
    out += stride;
  }

  // Filter line-by-line.
  while (row < last_row) {
    out[0] = (uint8_t)(in[0] - in[-stride]);
    GradientPredictDirect_SSE2(in + 1, in + 1 - stride, out + 1, width - 1);
    ++row;
    in += stride;
    out += stride;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl %r9d, -0x1c(%rbp)
movl -0x18(%rbp), %eax
imull -0x14(%rbp), %eax
cltq
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x2c(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x164bf0
jmp 0x164c0f
leaq 0x5aae7(%rip), %rdi     # 0x1bf6de
leaq 0x5bc76(%rip), %rsi     # 0x1c0874
movl $0xb3, %edx
leaq 0x5be02(%rip), %rcx     # 0x1c0a0c
callq 0x598a0
cmpq $0x0, 0x10(%rbp)
je 0x164c18
jmp 0x164c37
leaq 0x5ab20(%rip), %rdi     # 0x1bf73f
leaq 0x5bc4e(%rip), %rsi     # 0x1c0874
movl $0xb3, %edx
leaq 0x5bdda(%rip), %rcx     # 0x1c0a0c
callq 0x598a0
cmpl $0x0, -0xc(%rbp)
jle 0x164c3f
jmp 0x164c5e
leaq 0x5ab07(%rip), %rdi     # 0x1bf74d
leaq 0x5bc27(%rip), %rsi     # 0x1c0874
movl $0xb3, %edx
leaq 0x5bdb3(%rip), %rcx     # 0x1c0a0c
callq 0x598a0
cmpl $0x0, -0x10(%rbp)
jle 0x164c66
jmp 0x164c85
leaq 0x5aaea(%rip), %rdi     # 0x1bf757
leaq 0x5bc00(%rip), %rsi     # 0x1c0874
movl $0xb3, %edx
leaq 0x5bd8c(%rip), %rcx     # 0x1c0a0c
callq 0x598a0
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jl 0x164c8f
jmp 0x164cae
leaq 0x5aacc(%rip), %rdi     # 0x1bf762
leaq 0x5bbd7(%rip), %rsi     # 0x1c0874
movl $0xb3, %edx
leaq 0x5bd63(%rip), %rcx     # 0x1c0a0c
callq 0x598a0
cmpl $0x0, -0x18(%rbp)
jl 0x164cc7
cmpl $0x0, -0x1c(%rbp)
jle 0x164cc7
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0x164cc7
jmp 0x164ce6
leaq 0x5aaa4(%rip), %rdi     # 0x1bf772
leaq 0x5bb9f(%rip), %rsi     # 0x1c0874
movl $0xb3, %edx
leaq 0x5bd2b(%rip), %rcx     # 0x1c0a0c
callq 0x598a0
movq -0x28(%rbp), %rax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
addq 0x10(%rbp), %rax
movq %rax, 0x10(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x164d54
movq -0x8(%rbp), %rax
movb (%rax), %cl
movq 0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
addq $0x1, %rdi
movq 0x10(%rbp), %rsi
addq $0x1, %rsi
movl -0xc(%rbp), %edx
subl $0x1, %edx
callq 0x1644b0
movl $0x1, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movl -0x14(%rbp), %ecx
movq 0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rbp)
jmp 0x164d56
movl -0x18(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x164de2
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq -0x8(%rbp), %rcx
xorl %edx, %edx
subl -0x14(%rbp), %edx
movslq %edx, %rdx
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
movb %al, %cl
movq 0x10(%rbp), %rax
movb %cl, (%rax)
movq -0x8(%rbp), %rdi
addq $0x1, %rdi
movq -0x8(%rbp), %rsi
addq $0x1, %rsi
movslq -0x14(%rbp), %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movq 0x10(%rbp), %rdx
addq $0x1, %rdx
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
callq 0x164df0
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movl -0x14(%rbp), %ecx
movq 0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rbp)
jmp 0x164d56
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)