#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_sub_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_unpackhi_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_unpackhi_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_unpackhi_epi64(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_unpacklo_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_unpacklo_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_unpacklo_epi64(int /*<<< orphan*/, int /*<<< orphan*/);
void hadamard_col8_sse2(__m128i *in, int iter) {
  __m128i a0 = in[0];
  __m128i a1 = in[1];
  __m128i a2 = in[2];
  __m128i a3 = in[3];
  __m128i a4 = in[4];
  __m128i a5 = in[5];
  __m128i a6 = in[6];
  __m128i a7 = in[7];
  __m128i b0 = _mm_add_epi16(a0, a1);
  __m128i b1 = _mm_sub_epi16(a0, a1);
  __m128i b2 = _mm_add_epi16(a2, a3);
  __m128i b3 = _mm_sub_epi16(a2, a3);
  __m128i b4 = _mm_add_epi16(a4, a5);
  __m128i b5 = _mm_sub_epi16(a4, a5);
  __m128i b6 = _mm_add_epi16(a6, a7);
  __m128i b7 = _mm_sub_epi16(a6, a7);
  a0 = _mm_add_epi16(b0, b2);
  a1 = _mm_add_epi16(b1, b3);
  a2 = _mm_sub_epi16(b0, b2);
  a3 = _mm_sub_epi16(b1, b3);
  a4 = _mm_add_epi16(b4, b6);
  a5 = _mm_add_epi16(b5, b7);
  a6 = _mm_sub_epi16(b4, b6);
  a7 = _mm_sub_epi16(b5, b7);
  if (iter == 0) {
    b0 = _mm_add_epi16(a0, a4);
    b7 = _mm_add_epi16(a1, a5);
    b3 = _mm_add_epi16(a2, a6);
    b4 = _mm_add_epi16(a3, a7);
    b2 = _mm_sub_epi16(a0, a4);
    b6 = _mm_sub_epi16(a1, a5);
    b1 = _mm_sub_epi16(a2, a6);
    b5 = _mm_sub_epi16(a3, a7);
    a0 = _mm_unpacklo_epi16(b0, b1);
    a1 = _mm_unpacklo_epi16(b2, b3);
    a2 = _mm_unpackhi_epi16(b0, b1);
    a3 = _mm_unpackhi_epi16(b2, b3);
    a4 = _mm_unpacklo_epi16(b4, b5);
    a5 = _mm_unpacklo_epi16(b6, b7);
    a6 = _mm_unpackhi_epi16(b4, b5);
    a7 = _mm_unpackhi_epi16(b6, b7);
    b0 = _mm_unpacklo_epi32(a0, a1);
    b1 = _mm_unpacklo_epi32(a4, a5);
    b2 = _mm_unpackhi_epi32(a0, a1);
    b3 = _mm_unpackhi_epi32(a4, a5);
    b4 = _mm_unpacklo_epi32(a2, a3);
    b5 = _mm_unpacklo_epi32(a6, a7);
    b6 = _mm_unpackhi_epi32(a2, a3);
    b7 = _mm_unpackhi_epi32(a6, a7);
    in[0] = _mm_unpacklo_epi64(b0, b1);
    in[1] = _mm_unpackhi_epi64(b0, b1);
    in[2] = _mm_unpacklo_epi64(b2, b3);
    in[3] = _mm_unpackhi_epi64(b2, b3);
    in[4] = _mm_unpacklo_epi64(b4, b5);
    in[5] = _mm_unpackhi_epi64(b4, b5);
    in[6] = _mm_unpacklo_epi64(b6, b7);
    in[7] = _mm_unpackhi_epi64(b6, b7);
  } else {
    in[0] = _mm_add_epi16(a0, a4);
    in[7] = _mm_add_epi16(a1, a5);
    in[3] = _mm_add_epi16(a2, a6);
    in[4] = _mm_add_epi16(a3, a7);
    in[2] = _mm_sub_epi16(a0, a4);
    in[6] = _mm_sub_epi16(a1, a5);
    in[1] = _mm_sub_epi16(a2, a6);
    in[5] = _mm_sub_epi16(a3, a7);
  }
}


x86 assembly (clang, -O0):
<hadamard_col8_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x40(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x44(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x48(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x30(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x10(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%edi
mov    -0x38(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x18(%rbp)
mov    -0x34(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x48(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x20(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x24(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x48(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x28(%rbp)
mov    -0x44(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    14bc <hadamard_col8_sse2+0x33c>
mov    -0x10(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x30(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x38(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x48(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x34(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,-0x44(%rbp)
mov    -0x30(%rbp),%edi
mov    -0x34(%rbp),%esi
call   1080 <_mm_unpacklo_epi16@plt>
mov    %eax,-0x10(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1080 <_mm_unpacklo_epi16@plt>
mov    %eax,-0x14(%rbp)
mov    -0x30(%rbp),%edi
mov    -0x34(%rbp),%esi
call   1060 <_mm_unpackhi_epi16@plt>
mov    %eax,-0x18(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1060 <_mm_unpackhi_epi16@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1080 <_mm_unpacklo_epi16@plt>
mov    %eax,-0x20(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1080 <_mm_unpacklo_epi16@plt>
mov    %eax,-0x24(%rbp)
mov    -0x40(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1060 <_mm_unpackhi_epi16@plt>
mov    %eax,-0x28(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1060 <_mm_unpackhi_epi16@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1050 <_mm_unpacklo_epi32@plt>
mov    %eax,-0x30(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1050 <_mm_unpacklo_epi32@plt>
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
call   10a0 <_mm_unpackhi_epi32@plt>
mov    %eax,-0x38(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x24(%rbp),%esi
call   10a0 <_mm_unpackhi_epi32@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1050 <_mm_unpacklo_epi32@plt>
mov    %eax,-0x40(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1050 <_mm_unpacklo_epi32@plt>
mov    %eax,-0x44(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   10a0 <_mm_unpackhi_epi32@plt>
mov    %eax,-0x48(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   10a0 <_mm_unpackhi_epi32@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x30(%rbp),%edi
mov    -0x34(%rbp),%esi
call   1090 <_mm_unpacklo_epi64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x30(%rbp),%edi
mov    -0x34(%rbp),%esi
call   1070 <_mm_unpackhi_epi64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x38(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1090 <_mm_unpacklo_epi64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x38(%rbp),%edi
mov    -0x3c(%rbp),%esi
call   1070 <_mm_unpackhi_epi64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x40(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1090 <_mm_unpacklo_epi64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x40(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1070 <_mm_unpackhi_epi64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
mov    -0x48(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1090 <_mm_unpacklo_epi64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x48(%rbp),%edi
mov    -0x4c(%rbp),%esi
call   1070 <_mm_unpackhi_epi64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
jmp    155b <hadamard_col8_sse2+0x3db>
mov    -0x10(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x18(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x1c(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x10(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x14(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x18(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x1c(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hadamard_col8_sse2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %esi,0x24(%rsp)
mov    (%rdi),%ebx
mov    0x4(%rdi),%r14d
mov    0x8(%rdi),%r13d
mov    0xc(%rdi),%r12d
mov    0x10(%rdi),%ebp
mov    0x14(%rdi),%r15d
mov    0x18(%rdi),%eax
mov    %eax,0x10(%rsp)
mov    %rdi,0x30(%rsp)
mov    0x1c(%rdi),%eax
mov    %eax,0x14(%rsp)
mov    %ebx,%edi
mov    %r14d,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,0xc(%rsp)
mov    %ebx,%edi
mov    %r14d,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,0x20(%rsp)
mov    %r13d,%edi
mov    %r12d,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,%r14d
mov    %r13d,%edi
mov    %r12d,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,0x1c(%rsp)
mov    %ebp,%edi
mov    %r15d,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,0x18(%rsp)
mov    %ebp,%edi
mov    %r15d,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,0x8(%rsp)
mov    0x10(%rsp),%ebp
mov    %ebp,%edi
mov    0x14(%rsp),%ebx
mov    %ebx,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,%r15d
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,%r13d
mov    0xc(%rsp),%r12d
mov    %r12d,%edi
mov    %r14d,%ebx
mov    %r14d,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,0x10(%rsp)
mov    0x20(%rsp),%r14d
mov    %r14d,%edi
mov    0x1c(%rsp),%ebp
mov    %ebp,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,0x14(%rsp)
mov    %r12d,%edi
mov    %ebx,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,0xc(%rsp)
mov    %r14d,%edi
mov    %ebp,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,0x20(%rsp)
mov    0x18(%rsp),%ebx
mov    %ebx,%edi
mov    %r15d,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,%r14d
mov    0x8(%rsp),%ebp
mov    %ebp,%edi
mov    %r13d,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,0x1c(%rsp)
mov    %ebx,%edi
mov    %r15d,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %r13d,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,%r12d
mov    0x10(%rsp),%edi
mov    %edi,%r13d
mov    %r14d,0x8(%rsp)
mov    %r14d,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,%r15d
cmpl   $0x0,0x24(%rsp)
mov    %ebx,0x18(%rsp)
je     135e <hadamard_col8_sse2+0x1de>
mov    0x30(%rsp),%rbp
mov    %r15d,0x0(%rbp)
mov    0x14(%rsp),%r14d
mov    %r14d,%edi
mov    0x1c(%rsp),%r15d
mov    %r15d,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,0x1c(%rbp)
mov    %ebx,%esi
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1030 <_mm_add_epi16@plt>
mov    %eax,0xc(%rbp)
mov    0x20(%rsp),%r13d
mov    %r13d,%edi
mov    %r12d,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,0x10(%rbp)
mov    0x10(%rsp),%edi
mov    0x8(%rsp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,0x8(%rbp)
mov    %r14d,%edi
mov    %r15d,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,0x18(%rbp)
mov    %ebx,%edi
mov    0x18(%rsp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,0x4(%rbp)
mov    %r13d,%edi
mov    %r12d,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,0x14(%rbp)
jmp    1555 <hadamard_col8_sse2+0x3d5>
mov    0x14(%rsp),%edi
mov    0x1c(%rsp),%r14d
mov    %r14d,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,0x24(%rsp)
mov    0xc(%rsp),%ebp
mov    %ebp,%edi
mov    %ebx,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,0x28(%rsp)
mov    0x20(%rsp),%ebx
mov    %ebx,%edi
mov    %r12d,%esi
call   1030 <_mm_add_epi16@plt>
mov    %eax,0x2c(%rsp)
mov    %r13d,%edi
mov    0x8(%rsp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %ebx,%r13d
mov    %eax,%ebx
mov    0x14(%rsp),%edi
mov    %r14d,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,0x8(%rsp)
mov    %ebp,%edi
mov    0x18(%rsp),%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,%r14d
mov    %r13d,%edi
mov    %r12d,%esi
call   1040 <_mm_sub_epi16@plt>
mov    %eax,%r12d
mov    %r15d,%edi
mov    %r14d,%esi
call   1080 <_mm_unpacklo_epi16@plt>
mov    %eax,0xc(%rsp)
mov    %ebx,%edi
mov    0x28(%rsp),%ebp
mov    %ebp,%esi
call   1080 <_mm_unpacklo_epi16@plt>
mov    %eax,0x1c(%rsp)
mov    %r15d,%edi
mov    %r14d,%esi
call   1060 <_mm_unpackhi_epi16@plt>
mov    %eax,0x10(%rsp)
mov    %ebx,%edi
mov    %ebp,%esi
call   1060 <_mm_unpackhi_epi16@plt>
mov    %eax,0x14(%rsp)
mov    0x2c(%rsp),%ebp
mov    %ebp,%edi
mov    %r12d,%esi
call   1080 <_mm_unpacklo_epi16@plt>
mov    %eax,%r14d
mov    0x8(%rsp),%r13d
mov    %r13d,%edi
mov    0x24(%rsp),%ebx
mov    %ebx,%esi
call   1080 <_mm_unpacklo_epi16@plt>
mov    %eax,%r15d
mov    %ebp,%edi
mov    %r12d,%esi
call   1060 <_mm_unpackhi_epi16@plt>
mov    %eax,0x18(%rsp)
mov    %r13d,%edi
mov    %ebx,%esi
call   1060 <_mm_unpackhi_epi16@plt>
mov    %eax,%r13d
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
mov    0x1c(%rsp),%ebp
mov    %ebp,%esi
call   1050 <_mm_unpacklo_epi32@plt>
mov    %eax,0x20(%rsp)
mov    %r14d,%edi
mov    %r15d,%esi
call   1050 <_mm_unpacklo_epi32@plt>
mov    %eax,%r12d
mov    %ebx,%edi
mov    %ebp,%esi
call   10a0 <_mm_unpackhi_epi32@plt>
mov    %eax,0xc(%rsp)
mov    %r14d,%edi
mov    %r15d,%esi
call   10a0 <_mm_unpackhi_epi32@plt>
mov    %eax,%r15d
mov    0x10(%rsp),%ebp
mov    %ebp,%edi
mov    0x14(%rsp),%ebx
mov    %ebx,%esi
call   1050 <_mm_unpacklo_epi32@plt>
mov    %eax,0x24(%rsp)
mov    0x18(%rsp),%r14d
mov    %r14d,%edi
mov    %r13d,%esi
call   1050 <_mm_unpacklo_epi32@plt>
mov    %eax,0x8(%rsp)
mov    %ebp,%edi
mov    %ebx,%esi
call   10a0 <_mm_unpackhi_epi32@plt>
mov    %eax,0x10(%rsp)
mov    %r14d,%edi
mov    %r13d,%esi
call   10a0 <_mm_unpackhi_epi32@plt>
mov    %eax,%r13d
mov    0x20(%rsp),%ebx
mov    %ebx,%edi
mov    %r12d,%esi
call   1090 <_mm_unpacklo_epi64@plt>
mov    0x30(%rsp),%rbp
mov    %eax,0x0(%rbp)
mov    %ebx,%edi
mov    %r12d,%esi
call   1070 <_mm_unpackhi_epi64@plt>
mov    %eax,0x4(%rbp)
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
mov    %r15d,%esi
call   1090 <_mm_unpacklo_epi64@plt>
mov    %eax,0x8(%rbp)
mov    %ebx,%edi
mov    %r15d,%esi
call   1070 <_mm_unpackhi_epi64@plt>
mov    %eax,0xc(%rbp)
mov    0x24(%rsp),%ebx
mov    %ebx,%edi
mov    0x8(%rsp),%r14d
mov    %r14d,%esi
call   1090 <_mm_unpacklo_epi64@plt>
mov    %eax,0x10(%rbp)
mov    %ebx,%edi
mov    %r14d,%esi
call   1070 <_mm_unpackhi_epi64@plt>
mov    %eax,0x14(%rbp)
mov    0x10(%rsp),%ebx
mov    %ebx,%edi
mov    %r13d,%esi
call   1090 <_mm_unpacklo_epi64@plt>
mov    %eax,0x18(%rbp)
mov    %ebx,%edi
mov    %r13d,%esi
call   1070 <_mm_unpackhi_epi64@plt>
mov    %eax,0x1c(%rbp)
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @hadamard_col8_sse2(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%21 = load i32*, i32** %3
%22 = getelementptr inbounds i32, i32* %21, i64 0
%23 = load i32, i32* %22
store i32 %23, i32* %5
%24 = load i32*, i32** %3
%25 = getelementptr inbounds i32, i32* %24, i64 1
%26 = load i32, i32* %25
store i32 %26, i32* %6
%27 = load i32*, i32** %3
%28 = getelementptr inbounds i32, i32* %27, i64 2
%29 = load i32, i32* %28
store i32 %29, i32* %7
%30 = load i32*, i32** %3
%31 = getelementptr inbounds i32, i32* %30, i64 3
%32 = load i32, i32* %31
store i32 %32, i32* %8
%33 = load i32*, i32** %3
%34 = getelementptr inbounds i32, i32* %33, i64 4
%35 = load i32, i32* %34
store i32 %35, i32* %9
%36 = load i32*, i32** %3
%37 = getelementptr inbounds i32, i32* %36, i64 5
%38 = load i32, i32* %37
store i32 %38, i32* %10
%39 = load i32*, i32** %3
%40 = getelementptr inbounds i32, i32* %39, i64 6
%41 = load i32, i32* %40
store i32 %41, i32* %11
%42 = load i32*, i32** %3
%43 = getelementptr inbounds i32, i32* %42, i64 7
%44 = load i32, i32* %43
store i32 %44, i32* %12
%45 = load i32, i32* %5
%46 = load i32, i32* %6
%47 = call i32 @_mm_add_epi16(i32 %45, i32 %46)
store i32 %47, i32* %13
%48 = load i32, i32* %5
%49 = load i32, i32* %6
%50 = call i32 @_mm_sub_epi16(i32 %48, i32 %49)
store i32 %50, i32* %14
%51 = load i32, i32* %7
%52 = load i32, i32* %8
%53 = call i32 @_mm_add_epi16(i32 %51, i32 %52)
store i32 %53, i32* %15
%54 = load i32, i32* %7
%55 = load i32, i32* %8
%56 = call i32 @_mm_sub_epi16(i32 %54, i32 %55)
store i32 %56, i32* %16
%57 = load i32, i32* %9
%58 = load i32, i32* %10
%59 = call i32 @_mm_add_epi16(i32 %57, i32 %58)
store i32 %59, i32* %17
%60 = load i32, i32* %9
%61 = load i32, i32* %10
%62 = call i32 @_mm_sub_epi16(i32 %60, i32 %61)
store i32 %62, i32* %18
%63 = load i32, i32* %11
%64 = load i32, i32* %12
%65 = call i32 @_mm_add_epi16(i32 %63, i32 %64)
store i32 %65, i32* %19
%66 = load i32, i32* %11
%67 = load i32, i32* %12
%68 = call i32 @_mm_sub_epi16(i32 %66, i32 %67)
store i32 %68, i32* %20
%69 = load i32, i32* %13
%70 = load i32, i32* %15
%71 = call i32 @_mm_add_epi16(i32 %69, i32 %70)
store i32 %71, i32* %5
%72 = load i32, i32* %14
%73 = load i32, i32* %16
%74 = call i32 @_mm_add_epi16(i32 %72, i32 %73)
store i32 %74, i32* %6
%75 = load i32, i32* %13
%76 = load i32, i32* %15
%77 = call i32 @_mm_sub_epi16(i32 %75, i32 %76)
store i32 %77, i32* %7
%78 = load i32, i32* %14
%79 = load i32, i32* %16
%80 = call i32 @_mm_sub_epi16(i32 %78, i32 %79)
store i32 %80, i32* %8
%81 = load i32, i32* %17
%82 = load i32, i32* %19
%83 = call i32 @_mm_add_epi16(i32 %81, i32 %82)
store i32 %83, i32* %9
%84 = load i32, i32* %18
%85 = load i32, i32* %20
%86 = call i32 @_mm_add_epi16(i32 %84, i32 %85)
store i32 %86, i32* %10
%87 = load i32, i32* %17
%88 = load i32, i32* %19
%89 = call i32 @_mm_sub_epi16(i32 %87, i32 %88)
store i32 %89, i32* %11
%90 = load i32, i32* %18
%91 = load i32, i32* %20
%92 = call i32 @_mm_sub_epi16(i32 %90, i32 %91)
store i32 %92, i32* %12
%93 = load i32, i32* %4
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %208
95: ; preds = %2
%96 = load i32, i32* %5
%97 = load i32, i32* %9
%98 = call i32 @_mm_add_epi16(i32 %96, i32 %97)
store i32 %98, i32* %13
%99 = load i32, i32* %6
%100 = load i32, i32* %10
%101 = call i32 @_mm_add_epi16(i32 %99, i32 %100)
store i32 %101, i32* %20
%102 = load i32, i32* %7
%103 = load i32, i32* %11
%104 = call i32 @_mm_add_epi16(i32 %102, i32 %103)
store i32 %104, i32* %16
%105 = load i32, i32* %8
%106 = load i32, i32* %12
%107 = call i32 @_mm_add_epi16(i32 %105, i32 %106)
store i32 %107, i32* %17
%108 = load i32, i32* %5
%109 = load i32, i32* %9
%110 = call i32 @_mm_sub_epi16(i32 %108, i32 %109)
store i32 %110, i32* %15
%111 = load i32, i32* %6
%112 = load i32, i32* %10
%113 = call i32 @_mm_sub_epi16(i32 %111, i32 %112)
store i32 %113, i32* %19
%114 = load i32, i32* %7
%115 = load i32, i32* %11
%116 = call i32 @_mm_sub_epi16(i32 %114, i32 %115)
store i32 %116, i32* %14
%117 = load i32, i32* %8
%118 = load i32, i32* %12
%119 = call i32 @_mm_sub_epi16(i32 %117, i32 %118)
store i32 %119, i32* %18
%120 = load i32, i32* %13
%121 = load i32, i32* %14
%122 = call i32 @_mm_unpacklo_epi16(i32 %120, i32 %121)
store i32 %122, i32* %5
%123 = load i32, i32* %15
%124 = load i32, i32* %16
%125 = call i32 @_mm_unpacklo_epi16(i32 %123, i32 %124)
store i32 %125, i32* %6
%126 = load i32, i32* %13
%127 = load i32, i32* %14
%128 = call i32 @_mm_unpackhi_epi16(i32 %126, i32 %127)
store i32 %128, i32* %7
%129 = load i32, i32* %15
%130 = load i32, i32* %16
%131 = call i32 @_mm_unpackhi_epi16(i32 %129, i32 %130)
store i32 %131, i32* %8
%132 = load i32, i32* %17
%133 = load i32, i32* %18
%134 = call i32 @_mm_unpacklo_epi16(i32 %132, i32 %133)
store i32 %134, i32* %9
%135 = load i32, i32* %19
%136 = load i32, i32* %20
%137 = call i32 @_mm_unpacklo_epi16(i32 %135, i32 %136)
store i32 %137, i32* %10
%138 = load i32, i32* %17
%139 = load i32, i32* %18
%140 = call i32 @_mm_unpackhi_epi16(i32 %138, i32 %139)
store i32 %140, i32* %11
%141 = load i32, i32* %19
%142 = load i32, i32* %20
%143 = call i32 @_mm_unpackhi_epi16(i32 %141, i32 %142)
store i32 %143, i32* %12
%144 = load i32, i32* %5
%145 = load i32, i32* %6
%146 = call i32 @_mm_unpacklo_epi32(i32 %144, i32 %145)
store i32 %146, i32* %13
%147 = load i32, i32* %9
%148 = load i32, i32* %10
%149 = call i32 @_mm_unpacklo_epi32(i32 %147, i32 %148)
store i32 %149, i32* %14
%150 = load i32, i32* %5
%151 = load i32, i32* %6
%152 = call i32 @_mm_unpackhi_epi32(i32 %150, i32 %151)
store i32 %152, i32* %15
%153 = load i32, i32* %9
%154 = load i32, i32* %10
%155 = call i32 @_mm_unpackhi_epi32(i32 %153, i32 %154)
store i32 %155, i32* %16
%156 = load i32, i32* %7
%157 = load i32, i32* %8
%158 = call i32 @_mm_unpacklo_epi32(i32 %156, i32 %157)
store i32 %158, i32* %17
%159 = load i32, i32* %11
%160 = load i32, i32* %12
%161 = call i32 @_mm_unpacklo_epi32(i32 %159, i32 %160)
store i32 %161, i32* %18
%162 = load i32, i32* %7
%163 = load i32, i32* %8
%164 = call i32 @_mm_unpackhi_epi32(i32 %162, i32 %163)
store i32 %164, i32* %19
%165 = load i32, i32* %11
%166 = load i32, i32* %12
%167 = call i32 @_mm_unpackhi_epi32(i32 %165, i32 %166)
store i32 %167, i32* %20
%168 = load i32, i32* %13
%169 = load i32, i32* %14
%170 = call i32 @_mm_unpacklo_epi64(i32 %168, i32 %169)
%171 = load i32*, i32** %3
%172 = getelementptr inbounds i32, i32* %171, i64 0
store i32 %170, i32* %172
%173 = load i32, i32* %13
%174 = load i32, i32* %14
%175 = call i32 @_mm_unpackhi_epi64(i32 %173, i32 %174)
%176 = load i32*, i32** %3
%177 = getelementptr inbounds i32, i32* %176, i64 1
store i32 %175, i32* %177
%178 = load i32, i32* %15
%179 = load i32, i32* %16
%180 = call i32 @_mm_unpacklo_epi64(i32 %178, i32 %179)
%181 = load i32*, i32** %3
%182 = getelementptr inbounds i32, i32* %181, i64 2
store i32 %180, i32* %182
%183 = load i32, i32* %15
%184 = load i32, i32* %16
%185 = call i32 @_mm_unpackhi_epi64(i32 %183, i32 %184)
%186 = load i32*, i32** %3
%187 = getelementptr inbounds i32, i32* %186, i64 3
store i32 %185, i32* %187
%188 = load i32, i32* %17
%189 = load i32, i32* %18
%190 = call i32 @_mm_unpacklo_epi64(i32 %188, i32 %189)
%191 = load i32*, i32** %3
%192 = getelementptr inbounds i32, i32* %191, i64 4
store i32 %190, i32* %192
%193 = load i32, i32* %17
%194 = load i32, i32* %18
%195 = call i32 @_mm_unpackhi_epi64(i32 %193, i32 %194)
%196 = load i32*, i32** %3
%197 = getelementptr inbounds i32, i32* %196, i64 5
store i32 %195, i32* %197
%198 = load i32, i32* %19
%199 = load i32, i32* %20
%200 = call i32 @_mm_unpacklo_epi64(i32 %198, i32 %199)
%201 = load i32*, i32** %3
%202 = getelementptr inbounds i32, i32* %201, i64 6
store i32 %200, i32* %202
%203 = load i32, i32* %19
%204 = load i32, i32* %20
%205 = call i32 @_mm_unpackhi_epi64(i32 %203, i32 %204)
%206 = load i32*, i32** %3
%207 = getelementptr inbounds i32, i32* %206, i64 7
store i32 %205, i32* %207
br label %249
208: ; preds = %2
%209 = load i32, i32* %5
%210 = load i32, i32* %9
%211 = call i32 @_mm_add_epi16(i32 %209, i32 %210)
%212 = load i32*, i32** %3
%213 = getelementptr inbounds i32, i32* %212, i64 0
store i32 %211, i32* %213
%214 = load i32, i32* %6
%215 = load i32, i32* %10
%216 = call i32 @_mm_add_epi16(i32 %214, i32 %215)
%217 = load i32*, i32** %3
%218 = getelementptr inbounds i32, i32* %217, i64 7
store i32 %216, i32* %218
%219 = load i32, i32* %7
%220 = load i32, i32* %11
%221 = call i32 @_mm_add_epi16(i32 %219, i32 %220)
%222 = load i32*, i32** %3
%223 = getelementptr inbounds i32, i32* %222, i64 3
store i32 %221, i32* %223
%224 = load i32, i32* %8
%225 = load i32, i32* %12
%226 = call i32 @_mm_add_epi16(i32 %224, i32 %225)
%227 = load i32*, i32** %3
%228 = getelementptr inbounds i32, i32* %227, i64 4
store i32 %226, i32* %228
%229 = load i32, i32* %5
%230 = load i32, i32* %9
%231 = call i32 @_mm_sub_epi16(i32 %229, i32 %230)
%232 = load i32*, i32** %3
%233 = getelementptr inbounds i32, i32* %232, i64 2
store i32 %231, i32* %233
%234 = load i32, i32* %6
%235 = load i32, i32* %10
%236 = call i32 @_mm_sub_epi16(i32 %234, i32 %235)
%237 = load i32*, i32** %3
%238 = getelementptr inbounds i32, i32* %237, i64 6
store i32 %236, i32* %238
%239 = load i32, i32* %7
%240 = load i32, i32* %11
%241 = call i32 @_mm_sub_epi16(i32 %239, i32 %240)
%242 = load i32*, i32** %3
%243 = getelementptr inbounds i32, i32* %242, i64 1
store i32 %241, i32* %243
%244 = load i32, i32* %8
%245 = load i32, i32* %12
%246 = call i32 @_mm_sub_epi16(i32 %244, i32 %245)
%247 = load i32*, i32** %3
%248 = getelementptr inbounds i32, i32* %247, i64 5
store i32 %246, i32* %248
br label %249
249: ; preds = %208, %95
ret void
}

LLVM IR (-O2):
define void @hadamard_col8_sse2(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %0, i64 2
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %0, i64 3
%9 = load i32, i32* %8
%10 = getelementptr inbounds i32, i32* %0, i64 4
%11 = load i32, i32* %10
%12 = getelementptr inbounds i32, i32* %0, i64 5
%13 = load i32, i32* %12
%14 = getelementptr inbounds i32, i32* %0, i64 6
%15 = load i32, i32* %14
%16 = getelementptr inbounds i32, i32* %0, i64 7
%17 = load i32, i32* %16
%18 = tail call i32 @_mm_add_epi16(i32 %3, i32 %5)
%19 = tail call i32 @_mm_sub_epi16(i32 %3, i32 %5)
%20 = tail call i32 @_mm_add_epi16(i32 %7, i32 %9)
%21 = tail call i32 @_mm_sub_epi16(i32 %7, i32 %9)
%22 = tail call i32 @_mm_add_epi16(i32 %11, i32 %13)
%23 = tail call i32 @_mm_sub_epi16(i32 %11, i32 %13)
%24 = tail call i32 @_mm_add_epi16(i32 %15, i32 %17)
%25 = tail call i32 @_mm_sub_epi16(i32 %15, i32 %17)
%26 = tail call i32 @_mm_add_epi16(i32 %18, i32 %20)
%27 = tail call i32 @_mm_add_epi16(i32 %19, i32 %21)
%28 = tail call i32 @_mm_sub_epi16(i32 %18, i32 %20)
%29 = tail call i32 @_mm_sub_epi16(i32 %19, i32 %21)
%30 = tail call i32 @_mm_add_epi16(i32 %22, i32 %24)
%31 = tail call i32 @_mm_add_epi16(i32 %23, i32 %25)
%32 = tail call i32 @_mm_sub_epi16(i32 %22, i32 %24)
%33 = tail call i32 @_mm_sub_epi16(i32 %23, i32 %25)
%34 = icmp eq i32 %1, 0
%35 = tail call i32 @_mm_add_epi16(i32 %26, i32 %30)
br i1 %34, label %36, label %68
36: ; preds = %2
%37 = tail call i32 @_mm_add_epi16(i32 %27, i32 %31)
%38 = tail call i32 @_mm_add_epi16(i32 %28, i32 %32)
%39 = tail call i32 @_mm_add_epi16(i32 %29, i32 %33)
%40 = tail call i32 @_mm_sub_epi16(i32 %26, i32 %30)
%41 = tail call i32 @_mm_sub_epi16(i32 %27, i32 %31)
%42 = tail call i32 @_mm_sub_epi16(i32 %28, i32 %32)
%43 = tail call i32 @_mm_sub_epi16(i32 %29, i32 %33)
%44 = tail call i32 @_mm_unpacklo_epi16(i32 %35, i32 %42)
%45 = tail call i32 @_mm_unpacklo_epi16(i32 %40, i32 %38)
%46 = tail call i32 @_mm_unpackhi_epi16(i32 %35, i32 %42)
%47 = tail call i32 @_mm_unpackhi_epi16(i32 %40, i32 %38)
%48 = tail call i32 @_mm_unpacklo_epi16(i32 %39, i32 %43)
%49 = tail call i32 @_mm_unpacklo_epi16(i32 %41, i32 %37)
%50 = tail call i32 @_mm_unpackhi_epi16(i32 %39, i32 %43)
%51 = tail call i32 @_mm_unpackhi_epi16(i32 %41, i32 %37)
%52 = tail call i32 @_mm_unpacklo_epi32(i32 %44, i32 %45)
%53 = tail call i32 @_mm_unpacklo_epi32(i32 %48, i32 %49)
%54 = tail call i32 @_mm_unpackhi_epi32(i32 %44, i32 %45)
%55 = tail call i32 @_mm_unpackhi_epi32(i32 %48, i32 %49)
%56 = tail call i32 @_mm_unpacklo_epi32(i32 %46, i32 %47)
%57 = tail call i32 @_mm_unpacklo_epi32(i32 %50, i32 %51)
%58 = tail call i32 @_mm_unpackhi_epi32(i32 %46, i32 %47)
%59 = tail call i32 @_mm_unpackhi_epi32(i32 %50, i32 %51)
%60 = tail call i32 @_mm_unpacklo_epi64(i32 %52, i32 %53)
store i32 %60, i32* %0
%61 = tail call i32 @_mm_unpackhi_epi64(i32 %52, i32 %53)
store i32 %61, i32* %4
%62 = tail call i32 @_mm_unpacklo_epi64(i32 %54, i32 %55)
store i32 %62, i32* %6
%63 = tail call i32 @_mm_unpackhi_epi64(i32 %54, i32 %55)
store i32 %63, i32* %8
%64 = tail call i32 @_mm_unpacklo_epi64(i32 %56, i32 %57)
store i32 %64, i32* %10
%65 = tail call i32 @_mm_unpackhi_epi64(i32 %56, i32 %57)
store i32 %65, i32* %12
%66 = tail call i32 @_mm_unpacklo_epi64(i32 %58, i32 %59)
store i32 %66, i32* %14
%67 = tail call i32 @_mm_unpackhi_epi64(i32 %58, i32 %59)
store i32 %67, i32* %16
br label %76
68: ; preds = %2
store i32 %35, i32* %0
%69 = tail call i32 @_mm_add_epi16(i32 %27, i32 %31)
store i32 %69, i32* %16
%70 = tail call i32 @_mm_add_epi16(i32 %28, i32 %32)
store i32 %70, i32* %8
%71 = tail call i32 @_mm_add_epi16(i32 %29, i32 %33)
store i32 %71, i32* %10
%72 = tail call i32 @_mm_sub_epi16(i32 %26, i32 %30)
store i32 %72, i32* %6
%73 = tail call i32 @_mm_sub_epi16(i32 %27, i32 %31)
store i32 %73, i32* %14
%74 = tail call i32 @_mm_sub_epi16(i32 %28, i32 %32)
store i32 %74, i32* %4
%75 = tail call i32 @_mm_sub_epi16(i32 %29, i32 %33)
store i32 %75, i32* %12
br label %76
76: ; preds = %68, %36
ret void
}