#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_and_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_clmulepi64_si128(int /*<<< orphan*/, int /*<<< orphan*/,
                                        int);
int /*<<< orphan*/ _mm_insert_epi64(int /*<<< orphan*/ const,
                                    unsigned long long, int);
int /*<<< orphan*/ _mm_loadu_si128(int /*<<< orphan*/ const *);
int /*<<< orphan*/ _mm_or_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_set1_epi32(int);
int /*<<< orphan*/ _mm_set_epi8(int /*<<< orphan*/, int, int, int, int, int,
                                int, int, int, int, int, int, int, int, int,
                                int);
int /*<<< orphan*/ const _mm_setzero_si128();
int /*<<< orphan*/ _mm_shuffle_epi8(int /*<<< orphan*/,
                                    int /*<<< orphan*/ const);
int /*<<< orphan*/ _mm_slli_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_slli_si128(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_srli_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_srli_si128(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_storeu_si128(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/, int /*<<< orphan*/);
void addmul(unsigned char *c, const unsigned char *a, int xlen,
            const unsigned char *b) {
  const __m128i rev =
      _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
  const __m128i ff = _mm_set1_epi32(0xFFFFFFFF);
  __m128i A = _mm_loadu_si128((const __m128i *)a);
  A = _mm_shuffle_epi8(A, rev);
  if (xlen < 16) {
    unsigned long long mask = -1ull ^ (1ull << (((16 - xlen) % 8) * 8)) - 1ull;
    __m128i vm;
    if (xlen > 8) {
      vm = _mm_insert_epi64(ff, mask, 0);
    } else {
      vm = _mm_insert_epi64(_mm_setzero_si128(), mask, 1);
    }
    A = _mm_and_si128(vm, A);
  }
  __m128i B = _mm_loadu_si128((const __m128i *)b);
  __m128i C = _mm_loadu_si128((const __m128i *)c);
  A = _mm_xor_si128(A, C);
  __m128i tmp3 = _mm_clmulepi64_si128(A, B, 0x00);
  __m128i tmp4 = _mm_clmulepi64_si128(A, B, 0x10);
  __m128i tmp5 = _mm_clmulepi64_si128(A, B, 0x01);
  __m128i tmp6 = _mm_clmulepi64_si128(A, B, 0x11);
  __m128i tmp10 = _mm_xor_si128(tmp4, tmp5);
  __m128i tmp13 = _mm_slli_si128(tmp10, 8);
  __m128i tmp11 = _mm_srli_si128(tmp10, 8);
  __m128i tmp15 = _mm_xor_si128(tmp3, tmp13);
  __m128i tmp17 = _mm_xor_si128(tmp6, tmp11);
  __m128i tmp7 = _mm_srli_epi32(tmp15, 31);
  __m128i tmp8 = _mm_srli_epi32(tmp17, 31);
  __m128i tmp16 = _mm_slli_epi32(tmp15, 1);
  __m128i tmp18 = _mm_slli_epi32(tmp17, 1);
  __m128i tmp9 = _mm_srli_si128(tmp7, 12);
  __m128i tmp22 = _mm_slli_si128(tmp8, 4);
  __m128i tmp25 = _mm_slli_si128(tmp7, 4);
  __m128i tmp29 = _mm_or_si128(tmp16, tmp25);
  __m128i tmp19 = _mm_or_si128(tmp18, tmp22);
  __m128i tmp20 = _mm_or_si128(tmp19, tmp9);
  __m128i tmp26 = _mm_slli_epi32(tmp29, 31);
  __m128i tmp23 = _mm_slli_epi32(tmp29, 30);
  __m128i tmp32 = _mm_slli_epi32(tmp29, 25);
  __m128i tmp27 = _mm_xor_si128(tmp26, tmp23);
  __m128i tmp28 = _mm_xor_si128(tmp27, tmp32);
  __m128i tmp24 = _mm_srli_si128(tmp28, 4);
  __m128i tmp33 = _mm_slli_si128(tmp28, 12);
  __m128i tmp30 = _mm_xor_si128(tmp29, tmp33);
  __m128i tmp2 = _mm_srli_epi32(tmp30, 1);
  __m128i tmp12 = _mm_srli_epi32(tmp30, 2);
  __m128i tmp14 = _mm_srli_epi32(tmp30, 7);
  __m128i tmp34 = _mm_xor_si128(tmp2, tmp12);
  __m128i tmp35 = _mm_xor_si128(tmp34, tmp14);
  __m128i tmp36 = _mm_xor_si128(tmp35, tmp24);
  __m128i tmp31 = _mm_xor_si128(tmp30, tmp36);
  __m128i tmp21 = _mm_xor_si128(tmp20, tmp31);
  _mm_storeu_si128((__m128i *)c, tmp21);
}


x86 assembly (clang, -O0):
<addmul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
movl   $0x6,(%rsp)
movl   $0x7,0x8(%rsp)
movl   $0x8,0x10(%rsp)
movl   $0x9,0x18(%rsp)
movl   $0xa,0x20(%rsp)
movl   $0xb,0x28(%rsp)
movl   $0xc,0x30(%rsp)
movl   $0xd,0x38(%rsp)
movl   $0xe,0x40(%rsp)
movl   $0xf,0x48(%rsp)
call   1070 <_mm_set_epi8@plt>
mov    %eax,-0x24(%rbp)
mov    $0xffffffff,%edi
call   1080 <_mm_set1_epi32@plt>
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   10f0 <_mm_loadu_si128@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x10,-0x14(%rbp)
jge    1322 <addmul+0x132>
mov    $0x10,%eax
sub    -0x14(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
shl    $0x3,%edx
mov    %edx,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
sub    $0x1,%rax
xor    $0xffffffffffffffff,%rax
mov    %rax,-0x38(%rbp)
cmpl   $0x8,-0x14(%rbp)
jle    12fa <addmul+0x10a>
mov    -0x28(%rbp),%edi
mov    -0x38(%rbp),%rsi
xor    %edx,%edx
call   10d0 <_mm_insert_epi64@plt>
mov    %eax,-0x3c(%rbp)
jmp    1314 <addmul+0x124>
mov    $0x0,%al
call   1040 <_mm_setzero_si128@plt>
mov    %eax,%edi
mov    -0x38(%rbp),%rsi
mov    $0x1,%edx
call   10d0 <_mm_insert_epi64@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1100 <_mm_and_si128@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%rdi
call   10f0 <_mm_loadu_si128@plt>
mov    %eax,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
call   10f0 <_mm_loadu_si128@plt>
mov    %eax,-0x44(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x44(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x40(%rbp),%esi
xor    %edx,%edx
call   1030 <_mm_clmulepi64_si128@plt>
mov    %eax,-0x48(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    $0x10,%edx
call   1030 <_mm_clmulepi64_si128@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    $0x1,%edx
call   1030 <_mm_clmulepi64_si128@plt>
mov    %eax,-0x50(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x40(%rbp),%esi
mov    $0x11,%edx
call   1030 <_mm_clmulepi64_si128@plt>
mov    %eax,-0x54(%rbp)
mov    -0x4c(%rbp),%edi
mov    -0x50(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%edi
mov    $0x8,%esi
call   1110 <_mm_slli_si128@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x58(%rbp),%edi
mov    $0x8,%esi
call   1060 <_mm_srli_si128@plt>
mov    %eax,-0x60(%rbp)
mov    -0x48(%rbp),%edi
mov    -0x5c(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0x64(%rbp)
mov    -0x54(%rbp),%edi
mov    -0x60(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0x68(%rbp)
mov    -0x64(%rbp),%edi
mov    $0x1f,%esi
call   10e0 <_mm_srli_epi32@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x68(%rbp),%edi
mov    $0x1f,%esi
call   10e0 <_mm_srli_epi32@plt>
mov    %eax,-0x70(%rbp)
mov    -0x64(%rbp),%edi
mov    $0x1,%esi
call   10b0 <_mm_slli_epi32@plt>
mov    %eax,-0x74(%rbp)
mov    -0x68(%rbp),%edi
mov    $0x1,%esi
call   10b0 <_mm_slli_epi32@plt>
mov    %eax,-0x78(%rbp)
mov    -0x6c(%rbp),%edi
mov    $0xc,%esi
call   1060 <_mm_srli_si128@plt>
mov    %eax,-0x7c(%rbp)
mov    -0x70(%rbp),%edi
mov    $0x4,%esi
call   1110 <_mm_slli_si128@plt>
mov    %eax,-0x80(%rbp)
mov    -0x6c(%rbp),%edi
mov    $0x4,%esi
call   1110 <_mm_slli_si128@plt>
mov    %eax,-0x84(%rbp)
mov    -0x74(%rbp),%edi
mov    -0x84(%rbp),%esi
call   1090 <_mm_or_si128@plt>
mov    %eax,-0x88(%rbp)
mov    -0x78(%rbp),%edi
mov    -0x80(%rbp),%esi
call   1090 <_mm_or_si128@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%edi
mov    -0x7c(%rbp),%esi
call   1090 <_mm_or_si128@plt>
mov    %eax,-0x90(%rbp)
mov    -0x88(%rbp),%edi
mov    $0x1f,%esi
call   10b0 <_mm_slli_epi32@plt>
mov    %eax,-0x94(%rbp)
mov    -0x88(%rbp),%edi
mov    $0x1e,%esi
call   10b0 <_mm_slli_epi32@plt>
mov    %eax,-0x98(%rbp)
mov    -0x88(%rbp),%edi
mov    $0x19,%esi
call   10b0 <_mm_slli_epi32@plt>
mov    %eax,-0x9c(%rbp)
mov    -0x94(%rbp),%edi
mov    -0x98(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0xa0(%rbp)
mov    -0xa0(%rbp),%edi
mov    -0x9c(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0xa4(%rbp)
mov    -0xa4(%rbp),%edi
mov    $0x4,%esi
call   1060 <_mm_srli_si128@plt>
mov    %eax,-0xa8(%rbp)
mov    -0xa4(%rbp),%edi
mov    $0xc,%esi
call   1110 <_mm_slli_si128@plt>
mov    %eax,-0xac(%rbp)
mov    -0x88(%rbp),%edi
mov    -0xac(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0xb0(%rbp)
mov    -0xb0(%rbp),%edi
mov    $0x1,%esi
call   10e0 <_mm_srli_epi32@plt>
mov    %eax,-0xb4(%rbp)
mov    -0xb0(%rbp),%edi
mov    $0x2,%esi
call   10e0 <_mm_srli_epi32@plt>
mov    %eax,-0xb8(%rbp)
mov    -0xb0(%rbp),%edi
mov    $0x7,%esi
call   10e0 <_mm_srli_epi32@plt>
mov    %eax,-0xbc(%rbp)
mov    -0xb4(%rbp),%edi
mov    -0xb8(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0xc0(%rbp)
mov    -0xc0(%rbp),%edi
mov    -0xbc(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0xc4(%rbp)
mov    -0xc4(%rbp),%edi
mov    -0xa8(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0xc8(%rbp)
mov    -0xb0(%rbp),%edi
mov    -0xc8(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0xcc(%rbp)
mov    -0x90(%rbp),%edi
mov    -0xcc(%rbp),%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,-0xd0(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xd0(%rbp),%esi
call   10c0 <_mm_storeu_si128@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addmul>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%r15
mov    %edx,%ebx
mov    %rsi,%r13
mov    %rdi,%r14
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
mov    $0x5,%r9d
push   $0xf
push   $0xe
push   $0xd
push   $0xc
push   $0xb
push   $0xa
push   $0x9
push   $0x8
push   $0x7
push   $0x6
call   1070 <_mm_set_epi8@plt>
add    $0x50,%rsp
mov    %eax,%ebp
mov    $0xffffffff,%edi
call   1080 <_mm_set1_epi32@plt>
mov    %eax,%r12d
mov    %r13,%rdi
call   10f0 <_mm_loadu_si128@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <_mm_shuffle_epi8@plt>
mov    %eax,%r13d
cmp    $0xf,%ebx
jg     12b0 <addmul+0xc0>
lea    0x0(,%rbx,8),%ecx
neg    %cl
mov    $0xffffffffffffffff,%rbp
shl    %cl,%rbp
cmp    $0x9,%ebx
jl     128d <addmul+0x9d>
mov    %r12d,%edi
mov    %rbp,%rsi
xor    %edx,%edx
jmp    129e <addmul+0xae>
xor    %eax,%eax
call   1040 <_mm_setzero_si128@plt>
mov    %eax,%edi
mov    %rbp,%rsi
mov    $0x1,%edx
call   10d0 <_mm_insert_epi64@plt>
mov    %eax,%edi
mov    %r13d,%esi
call   1100 <_mm_and_si128@plt>
mov    %eax,%r13d
mov    %r15,%rdi
call   10f0 <_mm_loadu_si128@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   10f0 <_mm_loadu_si128@plt>
mov    %r13d,%edi
mov    %eax,%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %ebx,%esi
xor    %edx,%edx
call   1030 <_mm_clmulepi64_si128@plt>
mov    %eax,%r15d
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x10,%edx
call   1030 <_mm_clmulepi64_si128@plt>
mov    %eax,%r12d
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
call   1030 <_mm_clmulepi64_si128@plt>
mov    %eax,%r13d
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x11,%edx
call   1030 <_mm_clmulepi64_si128@plt>
mov    %r14,0x10(%rsp)
mov    %eax,%r14d
mov    %r12d,%edi
mov    %r13d,%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    $0x8,%esi
call   1110 <_mm_slli_si128@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    $0x8,%esi
call   1060 <_mm_srli_si128@plt>
mov    %eax,%ebp
mov    %r15d,%edi
mov    %ebx,%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,%ebx
mov    %r14d,%edi
mov    %ebp,%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x1f,%esi
call   10e0 <_mm_srli_epi32@plt>
mov    %eax,%r14d
mov    %ebp,%edi
mov    $0x1f,%esi
call   10e0 <_mm_srli_epi32@plt>
mov    %eax,%r15d
mov    %ebx,%edi
mov    $0x1,%esi
call   10b0 <_mm_slli_epi32@plt>
mov    %eax,0xc(%rsp)
mov    %ebp,%edi
mov    $0x1,%esi
call   10b0 <_mm_slli_epi32@plt>
mov    %eax,%r12d
mov    %r14d,%edi
mov    $0xc,%esi
call   1060 <_mm_srli_si128@plt>
mov    %eax,%r13d
mov    %r15d,%edi
mov    $0x4,%esi
call   1110 <_mm_slli_si128@plt>
mov    %eax,%ebx
mov    %r14d,%edi
mov    $0x4,%esi
call   1110 <_mm_slli_si128@plt>
mov    0xc(%rsp),%edi
mov    %eax,%esi
call   1090 <_mm_or_si128@plt>
mov    %eax,%ebp
mov    %r12d,%edi
mov    %ebx,%esi
call   1090 <_mm_or_si128@plt>
mov    %eax,%edi
mov    %r13d,%esi
call   1090 <_mm_or_si128@plt>
mov    %eax,%r15d
mov    %ebp,%edi
mov    $0x1f,%esi
call   10b0 <_mm_slli_epi32@plt>
mov    %eax,%r14d
mov    %ebp,%edi
mov    $0x1e,%esi
call   10b0 <_mm_slli_epi32@plt>
mov    %eax,%r12d
mov    %ebp,%edi
mov    $0x19,%esi
call   10b0 <_mm_slli_epi32@plt>
mov    %eax,%ebx
mov    %r14d,%edi
mov    %r12d,%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x4,%esi
call   1060 <_mm_srli_si128@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0xc,%esi
call   1110 <_mm_slli_si128@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    $0x1,%esi
call   10e0 <_mm_srli_epi32@plt>
mov    %eax,%r12d
mov    %ebp,%edi
mov    $0x2,%esi
call   10e0 <_mm_srli_epi32@plt>
mov    %eax,%r13d
mov    %ebp,%edi
mov    $0x7,%esi
call   10e0 <_mm_srli_epi32@plt>
mov    %eax,%ebx
mov    %r12d,%edi
mov    %r13d,%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   10a0 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %r14d,%esi
call   10a0 <_mm_xor_si128@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   10a0 <_mm_xor_si128@plt>
mov    %r15d,%edi
mov    %eax,%esi
call   10a0 <_mm_xor_si128@plt>
mov    0x10(%rsp),%rdi
mov    %eax,%esi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10c0 <_mm_storeu_si128@plt>

LLVM IR (-O0):
define void @addmul(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i64
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
%41 = alloca i32
%42 = alloca i32
%43 = alloca i32
%44 = alloca i32
%45 = alloca i32
%46 = alloca i32
%47 = alloca i32
%48 = alloca i32
%49 = alloca i32
%50 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%51 = call i32 @_mm_set_epi8(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15)
store i32 %51, i32* %9
%52 = call i32 @_mm_set1_epi32(i32 -1)
store i32 %52, i32* %10
%53 = load i8*, i8** %6
%54 = bitcast i8* %53 to i32*
%55 = call i32 @_mm_loadu_si128(i32* %54)
store i32 %55, i32* %11
%56 = load i32, i32* %11
%57 = load i32, i32* %9
%58 = call i32 @_mm_shuffle_epi8(i32 %56, i32 %57)
store i32 %58, i32* %11
%59 = load i32, i32* %7
%60 = icmp slt i32 %59, 16
br i1 %60, label %61, label %84
61: ; preds = %4
%62 = load i32, i32* %7
%63 = sub nsw i32 16, %62
%64 = srem i32 %63, 8
%65 = mul nsw i32 %64, 8
%66 = zext i32 %65 to i64
%67 = shl i64 1, %66
%68 = sub i64 %67, 1
%69 = xor i64 -1, %68
store i64 %69, i64* %12
%70 = load i32, i32* %7
%71 = icmp sgt i32 %70, 8
br i1 %71, label %72, label %76
72: ; preds = %61
%73 = load i32, i32* %10
%74 = load i64, i64* %12
%75 = call i32 @_mm_insert_epi64(i32 %73, i64 %74, i32 0)
store i32 %75, i32* %13
br label %80
76: ; preds = %61
%77 = call i32 (...) @_mm_setzero_si128()
%78 = load i64, i64* %12
%79 = call i32 @_mm_insert_epi64(i32 %77, i64 %78, i32 1)
store i32 %79, i32* %13
br label %80
80: ; preds = %76, %72
%81 = load i32, i32* %13
%82 = load i32, i32* %11
%83 = call i32 @_mm_and_si128(i32 %81, i32 %82)
store i32 %83, i32* %11
br label %84
84: ; preds = %80, %4
%85 = load i8*, i8** %8
%86 = bitcast i8* %85 to i32*
%87 = call i32 @_mm_loadu_si128(i32* %86)
store i32 %87, i32* %14
%88 = load i8*, i8** %5
%89 = bitcast i8* %88 to i32*
%90 = call i32 @_mm_loadu_si128(i32* %89)
store i32 %90, i32* %15
%91 = load i32, i32* %11
%92 = load i32, i32* %15
%93 = call i32 @_mm_xor_si128(i32 %91, i32 %92)
store i32 %93, i32* %11
%94 = load i32, i32* %11
%95 = load i32, i32* %14
%96 = call i32 @_mm_clmulepi64_si128(i32 %94, i32 %95, i32 0)
store i32 %96, i32* %16
%97 = load i32, i32* %11
%98 = load i32, i32* %14
%99 = call i32 @_mm_clmulepi64_si128(i32 %97, i32 %98, i32 16)
store i32 %99, i32* %17
%100 = load i32, i32* %11
%101 = load i32, i32* %14
%102 = call i32 @_mm_clmulepi64_si128(i32 %100, i32 %101, i32 1)
store i32 %102, i32* %18
%103 = load i32, i32* %11
%104 = load i32, i32* %14
%105 = call i32 @_mm_clmulepi64_si128(i32 %103, i32 %104, i32 17)
store i32 %105, i32* %19
%106 = load i32, i32* %17
%107 = load i32, i32* %18
%108 = call i32 @_mm_xor_si128(i32 %106, i32 %107)
store i32 %108, i32* %20
%109 = load i32, i32* %20
%110 = call i32 @_mm_slli_si128(i32 %109, i32 8)
store i32 %110, i32* %21
%111 = load i32, i32* %20
%112 = call i32 @_mm_srli_si128(i32 %111, i32 8)
store i32 %112, i32* %22
%113 = load i32, i32* %16
%114 = load i32, i32* %21
%115 = call i32 @_mm_xor_si128(i32 %113, i32 %114)
store i32 %115, i32* %23
%116 = load i32, i32* %19
%117 = load i32, i32* %22
%118 = call i32 @_mm_xor_si128(i32 %116, i32 %117)
store i32 %118, i32* %24
%119 = load i32, i32* %23
%120 = call i32 @_mm_srli_epi32(i32 %119, i32 31)
store i32 %120, i32* %25
%121 = load i32, i32* %24
%122 = call i32 @_mm_srli_epi32(i32 %121, i32 31)
store i32 %122, i32* %26
%123 = load i32, i32* %23
%124 = call i32 @_mm_slli_epi32(i32 %123, i32 1)
store i32 %124, i32* %27
%125 = load i32, i32* %24
%126 = call i32 @_mm_slli_epi32(i32 %125, i32 1)
store i32 %126, i32* %28
%127 = load i32, i32* %25
%128 = call i32 @_mm_srli_si128(i32 %127, i32 12)
store i32 %128, i32* %29
%129 = load i32, i32* %26
%130 = call i32 @_mm_slli_si128(i32 %129, i32 4)
store i32 %130, i32* %30
%131 = load i32, i32* %25
%132 = call i32 @_mm_slli_si128(i32 %131, i32 4)
store i32 %132, i32* %31
%133 = load i32, i32* %27
%134 = load i32, i32* %31
%135 = call i32 @_mm_or_si128(i32 %133, i32 %134)
store i32 %135, i32* %32
%136 = load i32, i32* %28
%137 = load i32, i32* %30
%138 = call i32 @_mm_or_si128(i32 %136, i32 %137)
store i32 %138, i32* %33
%139 = load i32, i32* %33
%140 = load i32, i32* %29
%141 = call i32 @_mm_or_si128(i32 %139, i32 %140)
store i32 %141, i32* %34
%142 = load i32, i32* %32
%143 = call i32 @_mm_slli_epi32(i32 %142, i32 31)
store i32 %143, i32* %35
%144 = load i32, i32* %32
%145 = call i32 @_mm_slli_epi32(i32 %144, i32 30)
store i32 %145, i32* %36
%146 = load i32, i32* %32
%147 = call i32 @_mm_slli_epi32(i32 %146, i32 25)
store i32 %147, i32* %37
%148 = load i32, i32* %35
%149 = load i32, i32* %36
%150 = call i32 @_mm_xor_si128(i32 %148, i32 %149)
store i32 %150, i32* %38
%151 = load i32, i32* %38
%152 = load i32, i32* %37
%153 = call i32 @_mm_xor_si128(i32 %151, i32 %152)
store i32 %153, i32* %39
%154 = load i32, i32* %39
%155 = call i32 @_mm_srli_si128(i32 %154, i32 4)
store i32 %155, i32* %40
%156 = load i32, i32* %39
%157 = call i32 @_mm_slli_si128(i32 %156, i32 12)
store i32 %157, i32* %41
%158 = load i32, i32* %32
%159 = load i32, i32* %41
%160 = call i32 @_mm_xor_si128(i32 %158, i32 %159)
store i32 %160, i32* %42
%161 = load i32, i32* %42
%162 = call i32 @_mm_srli_epi32(i32 %161, i32 1)
store i32 %162, i32* %43
%163 = load i32, i32* %42
%164 = call i32 @_mm_srli_epi32(i32 %163, i32 2)
store i32 %164, i32* %44
%165 = load i32, i32* %42
%166 = call i32 @_mm_srli_epi32(i32 %165, i32 7)
store i32 %166, i32* %45
%167 = load i32, i32* %43
%168 = load i32, i32* %44
%169 = call i32 @_mm_xor_si128(i32 %167, i32 %168)
store i32 %169, i32* %46
%170 = load i32, i32* %46
%171 = load i32, i32* %45
%172 = call i32 @_mm_xor_si128(i32 %170, i32 %171)
store i32 %172, i32* %47
%173 = load i32, i32* %47
%174 = load i32, i32* %40
%175 = call i32 @_mm_xor_si128(i32 %173, i32 %174)
store i32 %175, i32* %48
%176 = load i32, i32* %42
%177 = load i32, i32* %48
%178 = call i32 @_mm_xor_si128(i32 %176, i32 %177)
store i32 %178, i32* %49
%179 = load i32, i32* %34
%180 = load i32, i32* %49
%181 = call i32 @_mm_xor_si128(i32 %179, i32 %180)
store i32 %181, i32* %50
%182 = load i8*, i8** %5
%183 = bitcast i8* %182 to i32*
%184 = load i32, i32* %50
%185 = call i32 @_mm_storeu_si128(i32* %183, i32 %184)
ret void
}

LLVM IR (-O2):
define void @addmul(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @_mm_set_epi8(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15)
%6 = tail call i32 @_mm_set1_epi32(i32 -1)
%7 = bitcast i8* %1 to i32*
%8 = tail call i32 @_mm_loadu_si128(i32* %7)
%9 = tail call i32 @_mm_shuffle_epi8(i32 %8, i32 %5)
%10 = icmp slt i32 %2, 16
br i1 %10, label %11, label %25
11: ; preds = %4
%12 = mul i32 %2, -8
%13 = and i32 %12, 56
%14 = zext i32 %13 to i64
%15 = shl nsw i64 -1, %14
%16 = icmp sgt i32 %2, 8
br i1 %16, label %17, label %19
17: ; preds = %11
%18 = tail call i32 @_mm_insert_epi64(i32 %6, i64 %15, i32 0)
br label %22
19: ; preds = %11
%20 = tail call i32 (...) @_mm_setzero_si128()
%21 = tail call i32 @_mm_insert_epi64(i32 %20, i64 %15, i32 1)
br label %22
22: ; preds = %19, %17
%23 = phi i32 [ %18, %17 ], [ %21, %19 ]
%24 = tail call i32 @_mm_and_si128(i32 %23, i32 %9)
br label %25
25: ; preds = %22, %4
%26 = phi i32 [ %24, %22 ], [ %9, %4 ]
%27 = bitcast i8* %3 to i32*
%28 = tail call i32 @_mm_loadu_si128(i32* %27)
%29 = bitcast i8* %0 to i32*
%30 = tail call i32 @_mm_loadu_si128(i32* %29)
%31 = tail call i32 @_mm_xor_si128(i32 %26, i32 %30)
%32 = tail call i32 @_mm_clmulepi64_si128(i32 %31, i32 %28, i32 0)
%33 = tail call i32 @_mm_clmulepi64_si128(i32 %31, i32 %28, i32 16)
%34 = tail call i32 @_mm_clmulepi64_si128(i32 %31, i32 %28, i32 1)
%35 = tail call i32 @_mm_clmulepi64_si128(i32 %31, i32 %28, i32 17)
%36 = tail call i32 @_mm_xor_si128(i32 %33, i32 %34)
%37 = tail call i32 @_mm_slli_si128(i32 %36, i32 8)
%38 = tail call i32 @_mm_srli_si128(i32 %36, i32 8)
%39 = tail call i32 @_mm_xor_si128(i32 %32, i32 %37)
%40 = tail call i32 @_mm_xor_si128(i32 %35, i32 %38)
%41 = tail call i32 @_mm_srli_epi32(i32 %39, i32 31)
%42 = tail call i32 @_mm_srli_epi32(i32 %40, i32 31)
%43 = tail call i32 @_mm_slli_epi32(i32 %39, i32 1)
%44 = tail call i32 @_mm_slli_epi32(i32 %40, i32 1)
%45 = tail call i32 @_mm_srli_si128(i32 %41, i32 12)
%46 = tail call i32 @_mm_slli_si128(i32 %42, i32 4)
%47 = tail call i32 @_mm_slli_si128(i32 %41, i32 4)
%48 = tail call i32 @_mm_or_si128(i32 %43, i32 %47)
%49 = tail call i32 @_mm_or_si128(i32 %44, i32 %46)
%50 = tail call i32 @_mm_or_si128(i32 %49, i32 %45)
%51 = tail call i32 @_mm_slli_epi32(i32 %48, i32 31)
%52 = tail call i32 @_mm_slli_epi32(i32 %48, i32 30)
%53 = tail call i32 @_mm_slli_epi32(i32 %48, i32 25)
%54 = tail call i32 @_mm_xor_si128(i32 %51, i32 %52)
%55 = tail call i32 @_mm_xor_si128(i32 %54, i32 %53)
%56 = tail call i32 @_mm_srli_si128(i32 %55, i32 4)
%57 = tail call i32 @_mm_slli_si128(i32 %55, i32 12)
%58 = tail call i32 @_mm_xor_si128(i32 %48, i32 %57)
%59 = tail call i32 @_mm_srli_epi32(i32 %58, i32 1)
%60 = tail call i32 @_mm_srli_epi32(i32 %58, i32 2)
%61 = tail call i32 @_mm_srli_epi32(i32 %58, i32 7)
%62 = tail call i32 @_mm_xor_si128(i32 %59, i32 %60)
%63 = tail call i32 @_mm_xor_si128(i32 %62, i32 %61)
%64 = tail call i32 @_mm_xor_si128(i32 %63, i32 %56)
%65 = tail call i32 @_mm_xor_si128(i32 %58, i32 %64)
%66 = tail call i32 @_mm_xor_si128(i32 %50, i32 %65)
%67 = tail call i32 @_mm_storeu_si128(i32* %29, i32 %66)
ret void
}