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

/* Variables and functions */
int /*<<< orphan*/ le32toh(int /*<<< orphan*/);
void le32_to_cpu_block(uint32_t buf[16]) {
  int i;
  for (i = 0; i < 16; i++)
    buf[i] = le32toh(buf[i]);
}


x86 assembly (clang, -O0):
<le32_to_cpu_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    1158 <le32_to_cpu_block+0x48>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <le32toh@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <le32_to_cpu_block+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<le32_to_cpu_block>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1030 <le32toh@plt>
mov    %eax,(%rbx)
mov    0x4(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x4(%rbx)
mov    0x8(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x8(%rbx)
mov    0xc(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0xc(%rbx)
mov    0x10(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x10(%rbx)
mov    0x14(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x14(%rbx)
mov    0x18(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x18(%rbx)
mov    0x1c(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x1c(%rbx)
mov    0x20(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x20(%rbx)
mov    0x24(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x24(%rbx)
mov    0x28(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x28(%rbx)
mov    0x2c(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x2c(%rbx)
mov    0x30(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x30(%rbx)
mov    0x34(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x34(%rbx)
mov    0x38(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x38(%rbx)
mov    0x3c(%rbx),%edi
call   1030 <le32toh@plt>
mov    %eax,0x3c(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @le32_to_cpu_block(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 16
br i1 %6, label %7, label %21
7: ; preds = %4
%8 = load i32*, i32** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
%13 = call i32 @le32toh(i32 %12)
%14 = load i32*, i32** %2
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
store i32 %13, i32* %17
br label %18
18: ; preds = %7
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @le32_to_cpu_block(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @le32toh(i32 %2)
store i32 %3, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 @le32toh(i32 %5)
store i32 %6, i32* %4
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = tail call i32 @le32toh(i32 %8)
store i32 %9, i32* %7
%10 = getelementptr inbounds i32, i32* %0, i64 3
%11 = load i32, i32* %10
%12 = tail call i32 @le32toh(i32 %11)
store i32 %12, i32* %10
%13 = getelementptr inbounds i32, i32* %0, i64 4
%14 = load i32, i32* %13
%15 = tail call i32 @le32toh(i32 %14)
store i32 %15, i32* %13
%16 = getelementptr inbounds i32, i32* %0, i64 5
%17 = load i32, i32* %16
%18 = tail call i32 @le32toh(i32 %17)
store i32 %18, i32* %16
%19 = getelementptr inbounds i32, i32* %0, i64 6
%20 = load i32, i32* %19
%21 = tail call i32 @le32toh(i32 %20)
store i32 %21, i32* %19
%22 = getelementptr inbounds i32, i32* %0, i64 7
%23 = load i32, i32* %22
%24 = tail call i32 @le32toh(i32 %23)
store i32 %24, i32* %22
%25 = getelementptr inbounds i32, i32* %0, i64 8
%26 = load i32, i32* %25
%27 = tail call i32 @le32toh(i32 %26)
store i32 %27, i32* %25
%28 = getelementptr inbounds i32, i32* %0, i64 9
%29 = load i32, i32* %28
%30 = tail call i32 @le32toh(i32 %29)
store i32 %30, i32* %28
%31 = getelementptr inbounds i32, i32* %0, i64 10
%32 = load i32, i32* %31
%33 = tail call i32 @le32toh(i32 %32)
store i32 %33, i32* %31
%34 = getelementptr inbounds i32, i32* %0, i64 11
%35 = load i32, i32* %34
%36 = tail call i32 @le32toh(i32 %35)
store i32 %36, i32* %34
%37 = getelementptr inbounds i32, i32* %0, i64 12
%38 = load i32, i32* %37
%39 = tail call i32 @le32toh(i32 %38)
store i32 %39, i32* %37
%40 = getelementptr inbounds i32, i32* %0, i64 13
%41 = load i32, i32* %40
%42 = tail call i32 @le32toh(i32 %41)
store i32 %42, i32* %40
%43 = getelementptr inbounds i32, i32* %0, i64 14
%44 = load i32, i32* %43
%45 = tail call i32 @le32toh(i32 %44)
store i32 %45, i32* %43
%46 = getelementptr inbounds i32, i32* %0, i64 15
%47 = load i32, i32* %46
%48 = tail call i32 @le32toh(i32 %47)
store i32 %48, i32* %46
ret void
}