#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 uint64_t;
typedef int uint32_t;

/* Variables and functions */
void update_hist(int hist[], uint64_t token) {
  uint32_t t = token;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t = token >> 32;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist++ += t & 1;
  t >>= 1;
  *hist += t & 1;
}


x86 assembly (clang, -O0):
<update_hist>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
sar    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_hist>:
mov    %esi,%eax
shr    %eax
mov    %esi,%ecx
shr    $0x2,%ecx
mov    %esi,%edx
shr    $0x3,%edx
movd   %edx,%xmm0
movd   %ecx,%xmm1
punpckldq %xmm0,%xmm1
movd   %esi,%xmm2
movd   %eax,%xmm3
pshufd $0x0,%xmm2,%xmm0
punpckldq %xmm3,%xmm2
punpcklqdq %xmm1,%xmm2
movdqa 0xec9(%rip),%xmm1
pand   %xmm1,%xmm2
movdqu (%rdi),%xmm4
paddd  %xmm2,%xmm4
movdqu 0x10(%rdi),%xmm5
movdqu 0x20(%rdi),%xmm3
movdqu 0x30(%rdi),%xmm2
movdqu %xmm4,(%rdi)
movdqa %xmm0,%xmm4
psrld  $0x7,%xmm4
movdqa %xmm0,%xmm6
psrld  $0x6,%xmm6
punpckhqdq %xmm4,%xmm6
movdqa %xmm0,%xmm4
psrld  $0x5,%xmm4
movdqa %xmm0,%xmm7
psrld  $0x4,%xmm7
punpcklqdq %xmm4,%xmm7
shufps $0xcc,%xmm6,%xmm7
andps  %xmm1,%xmm7
paddd  %xmm5,%xmm7
movdqu %xmm7,0x10(%rdi)
movdqa %xmm0,%xmm4
psrld  $0xb,%xmm4
movdqa %xmm0,%xmm5
psrld  $0xa,%xmm5
punpckhqdq %xmm4,%xmm5
movdqa %xmm0,%xmm4
psrld  $0x9,%xmm4
movdqa %xmm0,%xmm6
psrld  $0x8,%xmm6
punpcklqdq %xmm4,%xmm6
shufps $0xcc,%xmm5,%xmm6
andps  %xmm1,%xmm6
paddd  %xmm3,%xmm6
movdqu %xmm6,0x20(%rdi)
movdqa %xmm0,%xmm3
psrld  $0xf,%xmm3
movdqa %xmm0,%xmm4
psrld  $0xe,%xmm4
punpckhqdq %xmm3,%xmm4
movdqa %xmm0,%xmm3
psrld  $0xd,%xmm3
movdqa %xmm0,%xmm5
psrld  $0xc,%xmm5
punpcklqdq %xmm3,%xmm5
shufps $0xcc,%xmm4,%xmm5
andps  %xmm1,%xmm5
paddd  %xmm2,%xmm5
movdqu %xmm5,0x30(%rdi)
movdqa %xmm0,%xmm2
psrld  $0x13,%xmm2
movdqa %xmm0,%xmm3
psrld  $0x12,%xmm3
punpckhqdq %xmm2,%xmm3
movdqa %xmm0,%xmm2
psrld  $0x11,%xmm2
movdqa %xmm0,%xmm4
psrld  $0x10,%xmm4
punpcklqdq %xmm2,%xmm4
shufps $0xcc,%xmm3,%xmm4
andps  %xmm1,%xmm4
movdqu 0x40(%rdi),%xmm2
paddd  %xmm4,%xmm2
movdqu %xmm2,0x40(%rdi)
movdqa %xmm0,%xmm2
psrld  $0x17,%xmm2
movdqa %xmm0,%xmm3
psrld  $0x16,%xmm3
punpckhqdq %xmm2,%xmm3
movdqa %xmm0,%xmm2
psrld  $0x15,%xmm2
movdqa %xmm0,%xmm4
psrld  $0x14,%xmm4
punpcklqdq %xmm2,%xmm4
shufps $0xcc,%xmm3,%xmm4
andps  %xmm1,%xmm4
movdqu 0x50(%rdi),%xmm2
paddd  %xmm4,%xmm2
movdqu %xmm2,0x50(%rdi)
movdqa %xmm0,%xmm2
psrld  $0x1b,%xmm2
movdqa %xmm0,%xmm3
psrld  $0x1a,%xmm3
punpckhqdq %xmm2,%xmm3
movdqa %xmm0,%xmm2
psrld  $0x19,%xmm2
psrld  $0x18,%xmm0
punpcklqdq %xmm2,%xmm0
shufps $0xcc,%xmm3,%xmm0
andps  %xmm1,%xmm0
movdqu 0x60(%rdi),%xmm1
paddd  %xmm0,%xmm1
movdqu %xmm1,0x60(%rdi)
mov    %esi,%eax
shr    $0x1c,%eax
and    $0x1,%eax
add    %eax,0x70(%rdi)
mov    %esi,%eax
shr    $0x1d,%eax
and    $0x1,%eax
add    %eax,0x74(%rdi)
mov    %esi,%eax
shr    $0x1e,%eax
and    $0x1,%eax
add    %eax,0x78(%rdi)
shr    $0x1f,%esi
add    %esi,0x7c(%rdi)
ret

LLVM IR (-O0):
define void @update_hist(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = and i32 %7, 1
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i32 1
store i32* %10, i32** %3
%11 = load i32, i32* %9
%12 = add nsw i32 %11, %8
store i32 %12, i32* %9
%13 = load i32, i32* %5
%14 = ashr i32 %13, 1
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = and i32 %15, 1
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i32 1
store i32* %18, i32** %3
%19 = load i32, i32* %17
%20 = add nsw i32 %19, %16
store i32 %20, i32* %17
%21 = load i32, i32* %5
%22 = ashr i32 %21, 1
store i32 %22, i32* %5
%23 = load i32, i32* %5
%24 = and i32 %23, 1
%25 = load i32*, i32** %3
%26 = getelementptr inbounds i32, i32* %25, i32 1
store i32* %26, i32** %3
%27 = load i32, i32* %25
%28 = add nsw i32 %27, %24
store i32 %28, i32* %25
%29 = load i32, i32* %5
%30 = ashr i32 %29, 1
store i32 %30, i32* %5
%31 = load i32, i32* %5
%32 = and i32 %31, 1
%33 = load i32*, i32** %3
%34 = getelementptr inbounds i32, i32* %33, i32 1
store i32* %34, i32** %3
%35 = load i32, i32* %33
%36 = add nsw i32 %35, %32
store i32 %36, i32* %33
%37 = load i32, i32* %5
%38 = ashr i32 %37, 1
store i32 %38, i32* %5
%39 = load i32, i32* %5
%40 = and i32 %39, 1
%41 = load i32*, i32** %3
%42 = getelementptr inbounds i32, i32* %41, i32 1
store i32* %42, i32** %3
%43 = load i32, i32* %41
%44 = add nsw i32 %43, %40
store i32 %44, i32* %41
%45 = load i32, i32* %5
%46 = ashr i32 %45, 1
store i32 %46, i32* %5
%47 = load i32, i32* %5
%48 = and i32 %47, 1
%49 = load i32*, i32** %3
%50 = getelementptr inbounds i32, i32* %49, i32 1
store i32* %50, i32** %3
%51 = load i32, i32* %49
%52 = add nsw i32 %51, %48
store i32 %52, i32* %49
%53 = load i32, i32* %5
%54 = ashr i32 %53, 1
store i32 %54, i32* %5
%55 = load i32, i32* %5
%56 = and i32 %55, 1
%57 = load i32*, i32** %3
%58 = getelementptr inbounds i32, i32* %57, i32 1
store i32* %58, i32** %3
%59 = load i32, i32* %57
%60 = add nsw i32 %59, %56
store i32 %60, i32* %57
%61 = load i32, i32* %5
%62 = ashr i32 %61, 1
store i32 %62, i32* %5
%63 = load i32, i32* %5
%64 = and i32 %63, 1
%65 = load i32*, i32** %3
%66 = getelementptr inbounds i32, i32* %65, i32 1
store i32* %66, i32** %3
%67 = load i32, i32* %65
%68 = add nsw i32 %67, %64
store i32 %68, i32* %65
%69 = load i32, i32* %5
%70 = ashr i32 %69, 1
store i32 %70, i32* %5
%71 = load i32, i32* %5
%72 = and i32 %71, 1
%73 = load i32*, i32** %3
%74 = getelementptr inbounds i32, i32* %73, i32 1
store i32* %74, i32** %3
%75 = load i32, i32* %73
%76 = add nsw i32 %75, %72
store i32 %76, i32* %73
%77 = load i32, i32* %5
%78 = ashr i32 %77, 1
store i32 %78, i32* %5
%79 = load i32, i32* %5
%80 = and i32 %79, 1
%81 = load i32*, i32** %3
%82 = getelementptr inbounds i32, i32* %81, i32 1
store i32* %82, i32** %3
%83 = load i32, i32* %81
%84 = add nsw i32 %83, %80
store i32 %84, i32* %81
%85 = load i32, i32* %5
%86 = ashr i32 %85, 1
store i32 %86, i32* %5
%87 = load i32, i32* %5
%88 = and i32 %87, 1
%89 = load i32*, i32** %3
%90 = getelementptr inbounds i32, i32* %89, i32 1
store i32* %90, i32** %3
%91 = load i32, i32* %89
%92 = add nsw i32 %91, %88
store i32 %92, i32* %89
%93 = load i32, i32* %5
%94 = ashr i32 %93, 1
store i32 %94, i32* %5
%95 = load i32, i32* %5
%96 = and i32 %95, 1
%97 = load i32*, i32** %3
%98 = getelementptr inbounds i32, i32* %97, i32 1
store i32* %98, i32** %3
%99 = load i32, i32* %97
%100 = add nsw i32 %99, %96
store i32 %100, i32* %97
%101 = load i32, i32* %5
%102 = ashr i32 %101, 1
store i32 %102, i32* %5
%103 = load i32, i32* %5
%104 = and i32 %103, 1
%105 = load i32*, i32** %3
%106 = getelementptr inbounds i32, i32* %105, i32 1
store i32* %106, i32** %3
%107 = load i32, i32* %105
%108 = add nsw i32 %107, %104
store i32 %108, i32* %105
%109 = load i32, i32* %5
%110 = ashr i32 %109, 1
store i32 %110, i32* %5
%111 = load i32, i32* %5
%112 = and i32 %111, 1
%113 = load i32*, i32** %3
%114 = getelementptr inbounds i32, i32* %113, i32 1
store i32* %114, i32** %3
%115 = load i32, i32* %113
%116 = add nsw i32 %115, %112
store i32 %116, i32* %113
%117 = load i32, i32* %5
%118 = ashr i32 %117, 1
store i32 %118, i32* %5
%119 = load i32, i32* %5
%120 = and i32 %119, 1
%121 = load i32*, i32** %3
%122 = getelementptr inbounds i32, i32* %121, i32 1
store i32* %122, i32** %3
%123 = load i32, i32* %121
%124 = add nsw i32 %123, %120
store i32 %124, i32* %121
%125 = load i32, i32* %5
%126 = ashr i32 %125, 1
store i32 %126, i32* %5
%127 = load i32, i32* %5
%128 = and i32 %127, 1
%129 = load i32*, i32** %3
%130 = getelementptr inbounds i32, i32* %129, i32 1
store i32* %130, i32** %3
%131 = load i32, i32* %129
%132 = add nsw i32 %131, %128
store i32 %132, i32* %129
%133 = load i32, i32* %5
%134 = ashr i32 %133, 1
store i32 %134, i32* %5
%135 = load i32, i32* %5
%136 = and i32 %135, 1
%137 = load i32*, i32** %3
%138 = getelementptr inbounds i32, i32* %137, i32 1
store i32* %138, i32** %3
%139 = load i32, i32* %137
%140 = add nsw i32 %139, %136
store i32 %140, i32* %137
%141 = load i32, i32* %5
%142 = ashr i32 %141, 1
store i32 %142, i32* %5
%143 = load i32, i32* %5
%144 = and i32 %143, 1
%145 = load i32*, i32** %3
%146 = getelementptr inbounds i32, i32* %145, i32 1
store i32* %146, i32** %3
%147 = load i32, i32* %145
%148 = add nsw i32 %147, %144
store i32 %148, i32* %145
%149 = load i32, i32* %5
%150 = ashr i32 %149, 1
store i32 %150, i32* %5
%151 = load i32, i32* %5
%152 = and i32 %151, 1
%153 = load i32*, i32** %3
%154 = getelementptr inbounds i32, i32* %153, i32 1
store i32* %154, i32** %3
%155 = load i32, i32* %153
%156 = add nsw i32 %155, %152
store i32 %156, i32* %153
%157 = load i32, i32* %5
%158 = ashr i32 %157, 1
store i32 %158, i32* %5
%159 = load i32, i32* %5
%160 = and i32 %159, 1
%161 = load i32*, i32** %3
%162 = getelementptr inbounds i32, i32* %161, i32 1
store i32* %162, i32** %3
%163 = load i32, i32* %161
%164 = add nsw i32 %163, %160
store i32 %164, i32* %161
%165 = load i32, i32* %5
%166 = ashr i32 %165, 1
store i32 %166, i32* %5
%167 = load i32, i32* %5
%168 = and i32 %167, 1
%169 = load i32*, i32** %3
%170 = getelementptr inbounds i32, i32* %169, i32 1
store i32* %170, i32** %3
%171 = load i32, i32* %169
%172 = add nsw i32 %171, %168
store i32 %172, i32* %169
%173 = load i32, i32* %5
%174 = ashr i32 %173, 1
store i32 %174, i32* %5
%175 = load i32, i32* %5
%176 = and i32 %175, 1
%177 = load i32*, i32** %3
%178 = getelementptr inbounds i32, i32* %177, i32 1
store i32* %178, i32** %3
%179 = load i32, i32* %177
%180 = add nsw i32 %179, %176
store i32 %180, i32* %177
%181 = load i32, i32* %5
%182 = ashr i32 %181, 1
store i32 %182, i32* %5
%183 = load i32, i32* %5
%184 = and i32 %183, 1
%185 = load i32*, i32** %3
%186 = getelementptr inbounds i32, i32* %185, i32 1
store i32* %186, i32** %3
%187 = load i32, i32* %185
%188 = add nsw i32 %187, %184
store i32 %188, i32* %185
%189 = load i32, i32* %5
%190 = ashr i32 %189, 1
store i32 %190, i32* %5
%191 = load i32, i32* %5
%192 = and i32 %191, 1
%193 = load i32*, i32** %3
%194 = getelementptr inbounds i32, i32* %193, i32 1
store i32* %194, i32** %3
%195 = load i32, i32* %193
%196 = add nsw i32 %195, %192
store i32 %196, i32* %193
%197 = load i32, i32* %5
%198 = ashr i32 %197, 1
store i32 %198, i32* %5
%199 = load i32, i32* %5
%200 = and i32 %199, 1
%201 = load i32*, i32** %3
%202 = getelementptr inbounds i32, i32* %201, i32 1
store i32* %202, i32** %3
%203 = load i32, i32* %201
%204 = add nsw i32 %203, %200
store i32 %204, i32* %201
%205 = load i32, i32* %5
%206 = ashr i32 %205, 1
store i32 %206, i32* %5
%207 = load i32, i32* %5
%208 = and i32 %207, 1
%209 = load i32*, i32** %3
%210 = getelementptr inbounds i32, i32* %209, i32 1
store i32* %210, i32** %3
%211 = load i32, i32* %209
%212 = add nsw i32 %211, %208
store i32 %212, i32* %209
%213 = load i32, i32* %5
%214 = ashr i32 %213, 1
store i32 %214, i32* %5
%215 = load i32, i32* %5
%216 = and i32 %215, 1
%217 = load i32*, i32** %3
%218 = getelementptr inbounds i32, i32* %217, i32 1
store i32* %218, i32** %3
%219 = load i32, i32* %217
%220 = add nsw i32 %219, %216
store i32 %220, i32* %217
%221 = load i32, i32* %5
%222 = ashr i32 %221, 1
store i32 %222, i32* %5
%223 = load i32, i32* %5
%224 = and i32 %223, 1
%225 = load i32*, i32** %3
%226 = getelementptr inbounds i32, i32* %225, i32 1
store i32* %226, i32** %3
%227 = load i32, i32* %225
%228 = add nsw i32 %227, %224
store i32 %228, i32* %225
%229 = load i32, i32* %5
%230 = ashr i32 %229, 1
store i32 %230, i32* %5
%231 = load i32, i32* %5
%232 = and i32 %231, 1
%233 = load i32*, i32** %3
%234 = getelementptr inbounds i32, i32* %233, i32 1
store i32* %234, i32** %3
%235 = load i32, i32* %233
%236 = add nsw i32 %235, %232
store i32 %236, i32* %233
%237 = load i32, i32* %5
%238 = ashr i32 %237, 1
store i32 %238, i32* %5
%239 = load i32, i32* %5
%240 = and i32 %239, 1
%241 = load i32*, i32** %3
%242 = getelementptr inbounds i32, i32* %241, i32 1
store i32* %242, i32** %3
%243 = load i32, i32* %241
%244 = add nsw i32 %243, %240
store i32 %244, i32* %241
%245 = load i32, i32* %5
%246 = ashr i32 %245, 1
store i32 %246, i32* %5
%247 = load i32, i32* %5
%248 = and i32 %247, 1
%249 = load i32*, i32** %3
%250 = getelementptr inbounds i32, i32* %249, i32 1
store i32* %250, i32** %3
%251 = load i32, i32* %249
%252 = add nsw i32 %251, %248
store i32 %252, i32* %249
%253 = load i32, i32* %5
%254 = ashr i32 %253, 1
store i32 %254, i32* %5
%255 = load i32, i32* %5
%256 = and i32 %255, 1
%257 = load i32*, i32** %3
%258 = getelementptr inbounds i32, i32* %257, i32 1
store i32* %258, i32** %3
%259 = load i32, i32* %257
%260 = add nsw i32 %259, %256
store i32 %260, i32* %257
%261 = load i32, i32* %4
%262 = ashr i32 %261, 32
store i32 %262, i32* %5
%263 = load i32, i32* %5
%264 = and i32 %263, 1
%265 = load i32*, i32** %3
%266 = getelementptr inbounds i32, i32* %265, i32 1
store i32* %266, i32** %3
%267 = load i32, i32* %265
%268 = add nsw i32 %267, %264
store i32 %268, i32* %265
%269 = load i32, i32* %5
%270 = ashr i32 %269, 1
store i32 %270, i32* %5
%271 = load i32, i32* %5
%272 = and i32 %271, 1
%273 = load i32*, i32** %3
%274 = getelementptr inbounds i32, i32* %273, i32 1
store i32* %274, i32** %3
%275 = load i32, i32* %273
%276 = add nsw i32 %275, %272
store i32 %276, i32* %273
%277 = load i32, i32* %5
%278 = ashr i32 %277, 1
store i32 %278, i32* %5
%279 = load i32, i32* %5
%280 = and i32 %279, 1
%281 = load i32*, i32** %3
%282 = getelementptr inbounds i32, i32* %281, i32 1
store i32* %282, i32** %3
%283 = load i32, i32* %281
%284 = add nsw i32 %283, %280
store i32 %284, i32* %281
%285 = load i32, i32* %5
%286 = ashr i32 %285, 1
store i32 %286, i32* %5
%287 = load i32, i32* %5
%288 = and i32 %287, 1
%289 = load i32*, i32** %3
%290 = getelementptr inbounds i32, i32* %289, i32 1
store i32* %290, i32** %3
%291 = load i32, i32* %289
%292 = add nsw i32 %291, %288
store i32 %292, i32* %289
%293 = load i32, i32* %5
%294 = ashr i32 %293, 1
store i32 %294, i32* %5
%295 = load i32, i32* %5
%296 = and i32 %295, 1
%297 = load i32*, i32** %3
%298 = getelementptr inbounds i32, i32* %297, i32 1
store i32* %298, i32** %3
%299 = load i32, i32* %297
%300 = add nsw i32 %299, %296
store i32 %300, i32* %297
%301 = load i32, i32* %5
%302 = ashr i32 %301, 1
store i32 %302, i32* %5
%303 = load i32, i32* %5
%304 = and i32 %303, 1
%305 = load i32*, i32** %3
%306 = getelementptr inbounds i32, i32* %305, i32 1
store i32* %306, i32** %3
%307 = load i32, i32* %305
%308 = add nsw i32 %307, %304
store i32 %308, i32* %305
%309 = load i32, i32* %5
%310 = ashr i32 %309, 1
store i32 %310, i32* %5
%311 = load i32, i32* %5
%312 = and i32 %311, 1
%313 = load i32*, i32** %3
%314 = getelementptr inbounds i32, i32* %313, i32 1
store i32* %314, i32** %3
%315 = load i32, i32* %313
%316 = add nsw i32 %315, %312
store i32 %316, i32* %313
%317 = load i32, i32* %5
%318 = ashr i32 %317, 1
store i32 %318, i32* %5
%319 = load i32, i32* %5
%320 = and i32 %319, 1
%321 = load i32*, i32** %3
%322 = getelementptr inbounds i32, i32* %321, i32 1
store i32* %322, i32** %3
%323 = load i32, i32* %321
%324 = add nsw i32 %323, %320
store i32 %324, i32* %321
%325 = load i32, i32* %5
%326 = ashr i32 %325, 1
store i32 %326, i32* %5
%327 = load i32, i32* %5
%328 = and i32 %327, 1
%329 = load i32*, i32** %3
%330 = getelementptr inbounds i32, i32* %329, i32 1
store i32* %330, i32** %3
%331 = load i32, i32* %329
%332 = add nsw i32 %331, %328
store i32 %332, i32* %329
%333 = load i32, i32* %5
%334 = ashr i32 %333, 1
store i32 %334, i32* %5
%335 = load i32, i32* %5
%336 = and i32 %335, 1
%337 = load i32*, i32** %3
%338 = getelementptr inbounds i32, i32* %337, i32 1
store i32* %338, i32** %3
%339 = load i32, i32* %337
%340 = add nsw i32 %339, %336
store i32 %340, i32* %337
%341 = load i32, i32* %5
%342 = ashr i32 %341, 1
store i32 %342, i32* %5
%343 = load i32, i32* %5
%344 = and i32 %343, 1
%345 = load i32*, i32** %3
%346 = getelementptr inbounds i32, i32* %345, i32 1
store i32* %346, i32** %3
%347 = load i32, i32* %345
%348 = add nsw i32 %347, %344
store i32 %348, i32* %345
%349 = load i32, i32* %5
%350 = ashr i32 %349, 1
store i32 %350, i32* %5
%351 = load i32, i32* %5
%352 = and i32 %351, 1
%353 = load i32*, i32** %3
%354 = getelementptr inbounds i32, i32* %353, i32 1
store i32* %354, i32** %3
%355 = load i32, i32* %353
%356 = add nsw i32 %355, %352
store i32 %356, i32* %353
%357 = load i32, i32* %5
%358 = ashr i32 %357, 1
store i32 %358, i32* %5
%359 = load i32, i32* %5
%360 = and i32 %359, 1
%361 = load i32*, i32** %3
%362 = getelementptr inbounds i32, i32* %361, i32 1
store i32* %362, i32** %3
%363 = load i32, i32* %361
%364 = add nsw i32 %363, %360
store i32 %364, i32* %361
%365 = load i32, i32* %5
%366 = ashr i32 %365, 1
store i32 %366, i32* %5
%367 = load i32, i32* %5
%368 = and i32 %367, 1
%369 = load i32*, i32** %3
%370 = getelementptr inbounds i32, i32* %369, i32 1
store i32* %370, i32** %3
%371 = load i32, i32* %369
%372 = add nsw i32 %371, %368
store i32 %372, i32* %369
%373 = load i32, i32* %5
%374 = ashr i32 %373, 1
store i32 %374, i32* %5
%375 = load i32, i32* %5
%376 = and i32 %375, 1
%377 = load i32*, i32** %3
%378 = getelementptr inbounds i32, i32* %377, i32 1
store i32* %378, i32** %3
%379 = load i32, i32* %377
%380 = add nsw i32 %379, %376
store i32 %380, i32* %377
%381 = load i32, i32* %5
%382 = ashr i32 %381, 1
store i32 %382, i32* %5
%383 = load i32, i32* %5
%384 = and i32 %383, 1
%385 = load i32*, i32** %3
%386 = getelementptr inbounds i32, i32* %385, i32 1
store i32* %386, i32** %3
%387 = load i32, i32* %385
%388 = add nsw i32 %387, %384
store i32 %388, i32* %385
%389 = load i32, i32* %5
%390 = ashr i32 %389, 1
store i32 %390, i32* %5
%391 = load i32, i32* %5
%392 = and i32 %391, 1
%393 = load i32*, i32** %3
%394 = getelementptr inbounds i32, i32* %393, i32 1
store i32* %394, i32** %3
%395 = load i32, i32* %393
%396 = add nsw i32 %395, %392
store i32 %396, i32* %393
%397 = load i32, i32* %5
%398 = ashr i32 %397, 1
store i32 %398, i32* %5
%399 = load i32, i32* %5
%400 = and i32 %399, 1
%401 = load i32*, i32** %3
%402 = getelementptr inbounds i32, i32* %401, i32 1
store i32* %402, i32** %3
%403 = load i32, i32* %401
%404 = add nsw i32 %403, %400
store i32 %404, i32* %401
%405 = load i32, i32* %5
%406 = ashr i32 %405, 1
store i32 %406, i32* %5
%407 = load i32, i32* %5
%408 = and i32 %407, 1
%409 = load i32*, i32** %3
%410 = getelementptr inbounds i32, i32* %409, i32 1
store i32* %410, i32** %3
%411 = load i32, i32* %409
%412 = add nsw i32 %411, %408
store i32 %412, i32* %409
%413 = load i32, i32* %5
%414 = ashr i32 %413, 1
store i32 %414, i32* %5
%415 = load i32, i32* %5
%416 = and i32 %415, 1
%417 = load i32*, i32** %3
%418 = getelementptr inbounds i32, i32* %417, i32 1
store i32* %418, i32** %3
%419 = load i32, i32* %417
%420 = add nsw i32 %419, %416
store i32 %420, i32* %417
%421 = load i32, i32* %5
%422 = ashr i32 %421, 1
store i32 %422, i32* %5
%423 = load i32, i32* %5
%424 = and i32 %423, 1
%425 = load i32*, i32** %3
%426 = getelementptr inbounds i32, i32* %425, i32 1
store i32* %426, i32** %3
%427 = load i32, i32* %425
%428 = add nsw i32 %427, %424
store i32 %428, i32* %425
%429 = load i32, i32* %5
%430 = ashr i32 %429, 1
store i32 %430, i32* %5
%431 = load i32, i32* %5
%432 = and i32 %431, 1
%433 = load i32*, i32** %3
%434 = getelementptr inbounds i32, i32* %433, i32 1
store i32* %434, i32** %3
%435 = load i32, i32* %433
%436 = add nsw i32 %435, %432
store i32 %436, i32* %433
%437 = load i32, i32* %5
%438 = ashr i32 %437, 1
store i32 %438, i32* %5
%439 = load i32, i32* %5
%440 = and i32 %439, 1
%441 = load i32*, i32** %3
%442 = getelementptr inbounds i32, i32* %441, i32 1
store i32* %442, i32** %3
%443 = load i32, i32* %441
%444 = add nsw i32 %443, %440
store i32 %444, i32* %441
%445 = load i32, i32* %5
%446 = ashr i32 %445, 1
store i32 %446, i32* %5
%447 = load i32, i32* %5
%448 = and i32 %447, 1
%449 = load i32*, i32** %3
%450 = getelementptr inbounds i32, i32* %449, i32 1
store i32* %450, i32** %3
%451 = load i32, i32* %449
%452 = add nsw i32 %451, %448
store i32 %452, i32* %449
%453 = load i32, i32* %5
%454 = ashr i32 %453, 1
store i32 %454, i32* %5
%455 = load i32, i32* %5
%456 = and i32 %455, 1
%457 = load i32*, i32** %3
%458 = getelementptr inbounds i32, i32* %457, i32 1
store i32* %458, i32** %3
%459 = load i32, i32* %457
%460 = add nsw i32 %459, %456
store i32 %460, i32* %457
%461 = load i32, i32* %5
%462 = ashr i32 %461, 1
store i32 %462, i32* %5
%463 = load i32, i32* %5
%464 = and i32 %463, 1
%465 = load i32*, i32** %3
%466 = getelementptr inbounds i32, i32* %465, i32 1
store i32* %466, i32** %3
%467 = load i32, i32* %465
%468 = add nsw i32 %467, %464
store i32 %468, i32* %465
%469 = load i32, i32* %5
%470 = ashr i32 %469, 1
store i32 %470, i32* %5
%471 = load i32, i32* %5
%472 = and i32 %471, 1
%473 = load i32*, i32** %3
%474 = getelementptr inbounds i32, i32* %473, i32 1
store i32* %474, i32** %3
%475 = load i32, i32* %473
%476 = add nsw i32 %475, %472
store i32 %476, i32* %473
%477 = load i32, i32* %5
%478 = ashr i32 %477, 1
store i32 %478, i32* %5
%479 = load i32, i32* %5
%480 = and i32 %479, 1
%481 = load i32*, i32** %3
%482 = getelementptr inbounds i32, i32* %481, i32 1
store i32* %482, i32** %3
%483 = load i32, i32* %481
%484 = add nsw i32 %483, %480
store i32 %484, i32* %481
%485 = load i32, i32* %5
%486 = ashr i32 %485, 1
store i32 %486, i32* %5
%487 = load i32, i32* %5
%488 = and i32 %487, 1
%489 = load i32*, i32** %3
%490 = getelementptr inbounds i32, i32* %489, i32 1
store i32* %490, i32** %3
%491 = load i32, i32* %489
%492 = add nsw i32 %491, %488
store i32 %492, i32* %489
%493 = load i32, i32* %5
%494 = ashr i32 %493, 1
store i32 %494, i32* %5
%495 = load i32, i32* %5
%496 = and i32 %495, 1
%497 = load i32*, i32** %3
%498 = getelementptr inbounds i32, i32* %497, i32 1
store i32* %498, i32** %3
%499 = load i32, i32* %497
%500 = add nsw i32 %499, %496
store i32 %500, i32* %497
%501 = load i32, i32* %5
%502 = ashr i32 %501, 1
store i32 %502, i32* %5
%503 = load i32, i32* %5
%504 = and i32 %503, 1
%505 = load i32*, i32** %3
%506 = getelementptr inbounds i32, i32* %505, i32 1
store i32* %506, i32** %3
%507 = load i32, i32* %505
%508 = add nsw i32 %507, %504
store i32 %508, i32* %505
%509 = load i32, i32* %5
%510 = ashr i32 %509, 1
store i32 %510, i32* %5
%511 = load i32, i32* %5
%512 = and i32 %511, 1
%513 = load i32*, i32** %3
%514 = load i32, i32* %513
%515 = add nsw i32 %514, %512
store i32 %515, i32* %513
ret void
}

LLVM IR (-O2):
define void @update_hist(i32* %0, i32 %1) {
%3 = lshr i32 %1, 1
%4 = lshr i32 %1, 2
%5 = lshr i32 %1, 3
%6 = insertelement <4 x i32> poison, i32 %1, i64 0
%7 = insertelement <4 x i32> %6, i32 %3, i64 1
%8 = insertelement <4 x i32> %7, i32 %4, i64 2
%9 = insertelement <4 x i32> %8, i32 %5, i64 3
%10 = and <4 x i32> %9, <i32 1, i32 1, i32 1, i32 1>
%11 = getelementptr inbounds i32, i32* %0, i64 4
%12 = bitcast i32* %0 to <4 x i32>*
%13 = load <4 x i32>, <4 x i32>* %12
%14 = add nsw <4 x i32> %13, %10
%15 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %14, <4 x i32>* %15
%16 = shufflevector <4 x i32> %6, <4 x i32> poison, <4 x i32> zeroinitializer
%17 = lshr <4 x i32> %16, <i32 4, i32 5, i32 6, i32 7>
%18 = and <4 x i32> %17, <i32 1, i32 1, i32 1, i32 1>
%19 = getelementptr inbounds i32, i32* %0, i64 8
%20 = bitcast i32* %11 to <4 x i32>*
%21 = load <4 x i32>, <4 x i32>* %20
%22 = add nsw <4 x i32> %21, %18
%23 = bitcast i32* %11 to <4 x i32>*
store <4 x i32> %22, <4 x i32>* %23
%24 = lshr <4 x i32> %16, <i32 8, i32 9, i32 10, i32 11>
%25 = and <4 x i32> %24, <i32 1, i32 1, i32 1, i32 1>
%26 = getelementptr inbounds i32, i32* %0, i64 12
%27 = bitcast i32* %19 to <4 x i32>*
%28 = load <4 x i32>, <4 x i32>* %27
%29 = add nsw <4 x i32> %28, %25
%30 = bitcast i32* %19 to <4 x i32>*
store <4 x i32> %29, <4 x i32>* %30
%31 = lshr <4 x i32> %16, <i32 12, i32 13, i32 14, i32 15>
%32 = and <4 x i32> %31, <i32 1, i32 1, i32 1, i32 1>
%33 = getelementptr inbounds i32, i32* %0, i64 16
%34 = bitcast i32* %26 to <4 x i32>*
%35 = load <4 x i32>, <4 x i32>* %34
%36 = add nsw <4 x i32> %35, %32
%37 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> %36, <4 x i32>* %37
%38 = lshr <4 x i32> %16, <i32 16, i32 17, i32 18, i32 19>
%39 = and <4 x i32> %38, <i32 1, i32 1, i32 1, i32 1>
%40 = getelementptr inbounds i32, i32* %0, i64 20
%41 = bitcast i32* %33 to <4 x i32>*
%42 = load <4 x i32>, <4 x i32>* %41
%43 = add nsw <4 x i32> %42, %39
%44 = bitcast i32* %33 to <4 x i32>*
store <4 x i32> %43, <4 x i32>* %44
%45 = lshr <4 x i32> %16, <i32 20, i32 21, i32 22, i32 23>
%46 = and <4 x i32> %45, <i32 1, i32 1, i32 1, i32 1>
%47 = getelementptr inbounds i32, i32* %0, i64 24
%48 = bitcast i32* %40 to <4 x i32>*
%49 = load <4 x i32>, <4 x i32>* %48
%50 = add nsw <4 x i32> %49, %46
%51 = bitcast i32* %40 to <4 x i32>*
store <4 x i32> %50, <4 x i32>* %51
%52 = lshr <4 x i32> %16, <i32 24, i32 25, i32 26, i32 27>
%53 = and <4 x i32> %52, <i32 1, i32 1, i32 1, i32 1>
%54 = getelementptr inbounds i32, i32* %0, i64 28
%55 = bitcast i32* %47 to <4 x i32>*
%56 = load <4 x i32>, <4 x i32>* %55
%57 = add nsw <4 x i32> %56, %53
%58 = bitcast i32* %47 to <4 x i32>*
store <4 x i32> %57, <4 x i32>* %58
%59 = lshr i32 %1, 28
%60 = and i32 %59, 1
%61 = getelementptr inbounds i32, i32* %0, i64 29
%62 = load i32, i32* %54
%63 = add nsw i32 %62, %60
store i32 %63, i32* %54
%64 = lshr i32 %1, 29
%65 = and i32 %64, 1
%66 = getelementptr inbounds i32, i32* %0, i64 30
%67 = load i32, i32* %61
%68 = add nsw i32 %67, %65
store i32 %68, i32* %61
%69 = lshr i32 %1, 30
%70 = and i32 %69, 1
%71 = getelementptr inbounds i32, i32* %0, i64 31
%72 = load i32, i32* %66
%73 = add nsw i32 %72, %70
store i32 %73, i32* %66
%74 = lshr i32 %1, 31
%75 = load i32, i32* %71
%76 = add nsw i32 %75, %74
store i32 %76, i32* %71
ret void
}