// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/dec_sse2.c
// Function: HFilter16i_SSE2
static void HFilter16i_SSE2(uint8_t* p, int stride,
                            int thresh, int ithresh, int hev_thresh) {
  int k;
  __m128i p3, p2, p1, p0;   // loop invariants

  Load16x4_SSE2(p, p + 8 * stride, stride, &p3, &p2, &p1, &p0);  // prologue

  for (k = 3; k > 0; --k) {
    __m128i mask, tmp1, tmp2;
    uint8_t* const b = p + 2;   // beginning of p1

    p += 4;  // beginning of q0 (and next span)

    MAX_DIFF1(p3, p2, p1, p0, mask);   // compute partial mask
    Load16x4_SSE2(p, p + 8 * stride, stride, &p3, &p2, &tmp1, &tmp2);
    MAX_DIFF2(p3, p2, tmp1, tmp2, mask);

    ComplexMask_SSE2(&p1, &p0, &p3, &p2, thresh, ithresh, &mask);
    DoFilter4_SSE2(&p1, &p0, &p3, &p2, &mask, hev_thresh);

    Store16x4_SSE2(&p1, &p0, &p3, &p2, b, b + 8 * stride, stride);

    // rotate samples
    p1 = tmp1;
    p0 = tmp2;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x380, %rsp            # imm = 0x380
movq %rdi, -0x2e8(%rbp)
movl %esi, -0x2ec(%rbp)
movl %edx, -0x2f0(%rbp)
movl %ecx, -0x2f4(%rbp)
movl %r8d, -0x2f8(%rbp)
movq -0x2e8(%rbp), %rdi
movq -0x2e8(%rbp), %rsi
movl -0x2ec(%rbp), %eax
shll $0x3, %eax
cltq
addq %rax, %rsi
movl -0x2ec(%rbp), %edx
leaq -0x310(%rbp), %rcx
leaq -0x320(%rbp), %r8
leaq -0x330(%rbp), %r9
leaq -0x340(%rbp), %rax
movq %rax, (%rsp)
callq 0x161490
movl $0x3, -0x2fc(%rbp)
cmpl $0x0, -0x2fc(%rbp)
jle 0x15c553
movq -0x2e8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x378(%rbp)
movq -0x2e8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x2e8(%rbp)
movdqa -0x340(%rbp), %xmm1
movdqa -0x330(%rbp), %xmm0
movdqa %xmm1, -0xb0(%rbp)
movdqa %xmm0, -0xc0(%rbp)
movdqa -0xb0(%rbp), %xmm1
movdqa -0xc0(%rbp), %xmm0
psubusb %xmm0, %xmm1
movdqa -0x330(%rbp), %xmm2
movdqa -0x340(%rbp), %xmm0
movdqa %xmm2, -0xd0(%rbp)
movdqa %xmm0, -0xe0(%rbp)
movdqa -0xd0(%rbp), %xmm0
movdqa -0xe0(%rbp), %xmm2
psubusb %xmm2, %xmm0
movdqa %xmm1, -0x230(%rbp)
movdqa %xmm0, -0x240(%rbp)
movdqa -0x230(%rbp), %xmm0
por -0x240(%rbp), %xmm0
movdqa %xmm0, -0x350(%rbp)
movdqa -0x350(%rbp), %xmm1
movdqa -0x320(%rbp), %xmm2
movdqa -0x310(%rbp), %xmm0
movdqa %xmm2, -0xf0(%rbp)
movdqa %xmm0, -0x100(%rbp)
movdqa -0xf0(%rbp), %xmm2
movdqa -0x100(%rbp), %xmm0
psubusb %xmm0, %xmm2
movdqa -0x310(%rbp), %xmm3
movdqa -0x320(%rbp), %xmm0
movdqa %xmm3, -0x110(%rbp)
movdqa %xmm0, -0x120(%rbp)
movdqa -0x110(%rbp), %xmm0
movdqa -0x120(%rbp), %xmm3
psubusb %xmm3, %xmm0
movdqa %xmm2, -0x250(%rbp)
movdqa %xmm0, -0x260(%rbp)
movdqa -0x250(%rbp), %xmm0
por -0x260(%rbp), %xmm0
movdqa %xmm1, -0x10(%rbp)
movdqa %xmm0, -0x20(%rbp)
movdqa -0x10(%rbp), %xmm0
movdqa -0x20(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x350(%rbp)
movdqa -0x350(%rbp), %xmm1
movdqa -0x330(%rbp), %xmm2
movdqa -0x320(%rbp), %xmm0
movdqa %xmm2, -0x130(%rbp)
movdqa %xmm0, -0x140(%rbp)
movdqa -0x130(%rbp), %xmm2
movdqa -0x140(%rbp), %xmm0
psubusb %xmm0, %xmm2
movdqa -0x320(%rbp), %xmm3
movdqa -0x330(%rbp), %xmm0
movdqa %xmm3, -0x150(%rbp)
movdqa %xmm0, -0x160(%rbp)
movdqa -0x150(%rbp), %xmm0
movdqa -0x160(%rbp), %xmm3
psubusb %xmm3, %xmm0
movdqa %xmm2, -0x270(%rbp)
movdqa %xmm0, -0x280(%rbp)
movdqa -0x270(%rbp), %xmm0
por -0x280(%rbp), %xmm0
movdqa %xmm1, -0x30(%rbp)
movdqa %xmm0, -0x40(%rbp)
movdqa -0x30(%rbp), %xmm0
movdqa -0x40(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x350(%rbp)
movq -0x2e8(%rbp), %rdi
movq -0x2e8(%rbp), %rsi
movl -0x2ec(%rbp), %eax
shll $0x3, %eax
cltq
addq %rax, %rsi
movl -0x2ec(%rbp), %edx
leaq -0x310(%rbp), %rcx
leaq -0x320(%rbp), %r8
leaq -0x360(%rbp), %r9
leaq -0x370(%rbp), %rax
movq %rax, (%rsp)
callq 0x161490
movdqa -0x350(%rbp), %xmm1
movdqa -0x370(%rbp), %xmm2
movdqa -0x360(%rbp), %xmm0
movdqa %xmm2, -0x170(%rbp)
movdqa %xmm0, -0x180(%rbp)
movdqa -0x170(%rbp), %xmm2
movdqa -0x180(%rbp), %xmm0
psubusb %xmm0, %xmm2
movdqa -0x360(%rbp), %xmm3
movdqa -0x370(%rbp), %xmm0
movdqa %xmm3, -0x190(%rbp)
movdqa %xmm0, -0x1a0(%rbp)
movdqa -0x190(%rbp), %xmm0
movdqa -0x1a0(%rbp), %xmm3
psubusb %xmm3, %xmm0
movdqa %xmm2, -0x290(%rbp)
movdqa %xmm0, -0x2a0(%rbp)
movdqa -0x290(%rbp), %xmm0
por -0x2a0(%rbp), %xmm0
movdqa %xmm1, -0x50(%rbp)
movdqa %xmm0, -0x60(%rbp)
movdqa -0x50(%rbp), %xmm0
movdqa -0x60(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x350(%rbp)
movdqa -0x350(%rbp), %xmm1
movdqa -0x320(%rbp), %xmm2
movdqa -0x310(%rbp), %xmm0
movdqa %xmm2, -0x1b0(%rbp)
movdqa %xmm0, -0x1c0(%rbp)
movdqa -0x1b0(%rbp), %xmm2
movdqa -0x1c0(%rbp), %xmm0
psubusb %xmm0, %xmm2
movdqa -0x310(%rbp), %xmm3
movdqa -0x320(%rbp), %xmm0
movdqa %xmm3, -0x1d0(%rbp)
movdqa %xmm0, -0x1e0(%rbp)
movdqa -0x1d0(%rbp), %xmm0
movdqa -0x1e0(%rbp), %xmm3
psubusb %xmm3, %xmm0
movdqa %xmm2, -0x2b0(%rbp)
movdqa %xmm0, -0x2c0(%rbp)
movdqa -0x2b0(%rbp), %xmm0
por -0x2c0(%rbp), %xmm0
movdqa %xmm1, -0x70(%rbp)
movdqa %xmm0, -0x80(%rbp)
movdqa -0x70(%rbp), %xmm0
movdqa -0x80(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x350(%rbp)
movdqa -0x350(%rbp), %xmm1
movdqa -0x360(%rbp), %xmm2
movdqa -0x320(%rbp), %xmm0
movdqa %xmm2, -0x1f0(%rbp)
movdqa %xmm0, -0x200(%rbp)
movdqa -0x1f0(%rbp), %xmm2
movdqa -0x200(%rbp), %xmm0
psubusb %xmm0, %xmm2
movdqa -0x320(%rbp), %xmm3
movdqa -0x360(%rbp), %xmm0
movdqa %xmm3, -0x210(%rbp)
movdqa %xmm0, -0x220(%rbp)
movdqa -0x210(%rbp), %xmm0
movdqa -0x220(%rbp), %xmm3
psubusb %xmm3, %xmm0
movdqa %xmm2, -0x2d0(%rbp)
movdqa %xmm0, -0x2e0(%rbp)
movdqa -0x2d0(%rbp), %xmm0
por -0x2e0(%rbp), %xmm0
movdqa %xmm1, -0x90(%rbp)
movdqa %xmm0, -0xa0(%rbp)
movdqa -0x90(%rbp), %xmm0
movdqa -0xa0(%rbp), %xmm1
pmaxub %xmm1, %xmm0
movdqa %xmm0, -0x350(%rbp)
movl -0x2f0(%rbp), %r8d
movl -0x2f4(%rbp), %r9d
leaq -0x330(%rbp), %rdi
leaq -0x340(%rbp), %rsi
leaq -0x310(%rbp), %rdx
leaq -0x320(%rbp), %rcx
leaq -0x350(%rbp), %rax
movq %rax, (%rsp)
callq 0x15f810
movl -0x2f8(%rbp), %r9d
leaq -0x330(%rbp), %rdi
leaq -0x340(%rbp), %rsi
leaq -0x310(%rbp), %rdx
leaq -0x320(%rbp), %rcx
leaq -0x350(%rbp), %r8
callq 0x161bf0
movq -0x378(%rbp), %r8
movq -0x378(%rbp), %r9
movl -0x2ec(%rbp), %eax
shll $0x3, %eax
cltq
addq %rax, %r9
movl -0x2ec(%rbp), %eax
leaq -0x330(%rbp), %rdi
leaq -0x340(%rbp), %rsi
leaq -0x310(%rbp), %rdx
leaq -0x320(%rbp), %rcx
movl %eax, (%rsp)
callq 0x1615f0
movdqa -0x360(%rbp), %xmm0
movdqa %xmm0, -0x330(%rbp)
movdqa -0x370(%rbp), %xmm0
movdqa %xmm0, -0x340(%rbp)
movl -0x2fc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2fc(%rbp)
jmp 0x15bfec
addq $0x380, %rsp            # imm = 0x380
popq %rbp
retq
nopl (%rax)