#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*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ libcperciva_be32dec(int /*<<< orphan*/ const *);
void be32dec_vect(uint32_t *dst, const uint8_t *src, size_t len) {
  do {
    dst[0] = libcperciva_be32dec(&src[0]);
    dst[1] = libcperciva_be32dec(&src[4]);
    src += 8;
    dst += 2;
  } while (--len);
}


x86 assembly (clang, -O0):
<be32dec_vect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <libcperciva_be32dec@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
call   1030 <libcperciva_be32dec@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1124 <be32dec_vect+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be32dec_vect>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r12,%rdi
call   1030 <libcperciva_be32dec@plt>
mov    %eax,(%r15,%rbx,8)
lea    0x10(%r12),%rdi
call   1030 <libcperciva_be32dec@plt>
mov    %eax,0x4(%r15,%rbx,8)
add    $0x1,%rbx
add    $0x20,%r12
cmp    %rbx,%r14
jne    1130 <be32dec_vect+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @be32dec_vect(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
br label %7
7: ; preds = %22, %3
%8 = load i32*, i32** %5
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = call i32 @libcperciva_be32dec(i32* %9)
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i64 0
store i32 %10, i32* %12
%13 = load i32*, i32** %5
%14 = getelementptr inbounds i32, i32* %13, i64 4
%15 = call i32 @libcperciva_be32dec(i32* %14)
%16 = load i32*, i32** %4
%17 = getelementptr inbounds i32, i32* %16, i64 1
store i32 %15, i32* %17
%18 = load i32*, i32** %5
%19 = getelementptr inbounds i32, i32* %18, i64 8
store i32* %19, i32** %5
%20 = load i32*, i32** %4
%21 = getelementptr inbounds i32, i32* %20, i64 2
store i32* %21, i32** %4
br label %22
22: ; preds = %7
%23 = load i64, i64* %6
%24 = add i64 %23, -1
store i64 %24, i64* %6
%25 = icmp ne i64 %24, 0
br i1 %25, label %7, label %26
26: ; preds = %22
ret void
}

LLVM IR (-O2):
define void @be32dec_vect(i32* nocapture writeonly %0, i32* %1, i64 %2) {
br label %4
4: ; preds = %4, %3
%5 = phi i32* [ %0, %3 ], [ %13, %4 ]
%6 = phi i32* [ %1, %3 ], [ %12, %4 ]
%7 = phi i64 [ %2, %3 ], [ %14, %4 ]
%8 = tail call i32 @libcperciva_be32dec(i32* %6)
store i32 %8, i32* %5
%9 = getelementptr inbounds i32, i32* %6, i64 4
%10 = tail call i32 @libcperciva_be32dec(i32* %9)
%11 = getelementptr inbounds i32, i32* %5, i64 1
store i32 %10, i32* %11
%12 = getelementptr inbounds i32, i32* %6, i64 8
%13 = getelementptr inbounds i32, i32* %5, i64 2
%14 = add i64 %7, -1
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %4
ret void
}