#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 */

/* Variables and functions */
unsigned long long _bzhi_u64(unsigned long long, int);
unsigned long long test__bzhi_u64_group(unsigned long long a) {
  unsigned long long res;
  res = _bzhi_u64(a, 8);
  res += _bzhi_u64(a, 16);
  res += _bzhi_u64(a, 24);
  res += _bzhi_u64(a, 32);
  res += _bzhi_u64(a, 40);
  res += _bzhi_u64(a, 48);
  return (res);
}


x86 assembly (clang, -O0):
<test__bzhi_u64_group>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
call   1030 <_bzhi_u64@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x10,%esi
call   1030 <_bzhi_u64@plt>
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x18,%esi
call   1030 <_bzhi_u64@plt>
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1030 <_bzhi_u64@plt>
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x28,%esi
call   1030 <_bzhi_u64@plt>
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x30,%esi
call   1030 <_bzhi_u64@plt>
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test__bzhi_u64_group>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    $0x8,%esi
call   1030 <_bzhi_u64@plt>
mov    %rax,%r14
mov    %r15,%rdi
mov    $0x10,%esi
call   1030 <_bzhi_u64@plt>
mov    %rax,%rbx
add    %r14,%rbx
mov    %r15,%rdi
mov    $0x18,%esi
call   1030 <_bzhi_u64@plt>
mov    %rax,%r14
add    %rbx,%r14
mov    %r15,%rdi
mov    $0x20,%esi
call   1030 <_bzhi_u64@plt>
mov    %rax,%rbx
add    %r14,%rbx
mov    %r15,%rdi
mov    $0x28,%esi
call   1030 <_bzhi_u64@plt>
mov    %rax,%r14
add    %rbx,%r14
mov    %r15,%rdi
mov    $0x30,%esi
call   1030 <_bzhi_u64@plt>
add    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @test__bzhi_u64_group(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @_bzhi_u64(i64 %4, i32 8)
store i64 %5, i64* %3
%6 = load i64, i64* %2
%7 = call i64 @_bzhi_u64(i64 %6, i32 16)
%8 = load i64, i64* %3
%9 = add i64 %8, %7
store i64 %9, i64* %3
%10 = load i64, i64* %2
%11 = call i64 @_bzhi_u64(i64 %10, i32 24)
%12 = load i64, i64* %3
%13 = add i64 %12, %11
store i64 %13, i64* %3
%14 = load i64, i64* %2
%15 = call i64 @_bzhi_u64(i64 %14, i32 32)
%16 = load i64, i64* %3
%17 = add i64 %16, %15
store i64 %17, i64* %3
%18 = load i64, i64* %2
%19 = call i64 @_bzhi_u64(i64 %18, i32 40)
%20 = load i64, i64* %3
%21 = add i64 %20, %19
store i64 %21, i64* %3
%22 = load i64, i64* %2
%23 = call i64 @_bzhi_u64(i64 %22, i32 48)
%24 = load i64, i64* %3
%25 = add i64 %24, %23
store i64 %25, i64* %3
%26 = load i64, i64* %3
ret i64 %26
}

LLVM IR (-O2):
define i64 @test__bzhi_u64_group(i64 %0) {
%2 = tail call i64 @_bzhi_u64(i64 %0, i32 8)
%3 = tail call i64 @_bzhi_u64(i64 %0, i32 16)
%4 = add i64 %3, %2
%5 = tail call i64 @_bzhi_u64(i64 %0, i32 24)
%6 = add i64 %4, %5
%7 = tail call i64 @_bzhi_u64(i64 %0, i32 32)
%8 = add i64 %6, %7
%9 = tail call i64 @_bzhi_u64(i64 %0, i32 40)
%10 = add i64 %8, %9
%11 = tail call i64 @_bzhi_u64(i64 %0, i32 48)
%12 = add i64 %10, %11
ret i64 %12
}