#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 */
void copy_block(void *d, const void *s) {
  ((uint32_t *)d)[0] = ((uint32_t *)s)[0];
  ((uint32_t *)d)[1] = ((uint32_t *)s)[1];
  ((uint32_t *)d)[2] = ((uint32_t *)s)[2];
  ((uint32_t *)d)[3] = ((uint32_t *)s)[3];
}


x86 assembly (clang, -O0):
<copy_block>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_block>:
mov    (%rsi),%eax
mov    %eax,(%rdi)
mov    0x4(%rsi),%eax
mov    %eax,0x4(%rdi)
mov    0x8(%rsi),%eax
mov    %eax,0x8(%rdi)
mov    0xc(%rsi),%eax
mov    %eax,0xc(%rdi)
ret

LLVM IR (-O0):
define void @copy_block(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = load i8*, i8** %3
%10 = bitcast i8* %9 to i32*
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %8, i32* %11
%12 = load i8*, i8** %4
%13 = bitcast i8* %12 to i32*
%14 = getelementptr inbounds i32, i32* %13, i64 1
%15 = load i32, i32* %14
%16 = load i8*, i8** %3
%17 = bitcast i8* %16 to i32*
%18 = getelementptr inbounds i32, i32* %17, i64 1
store i32 %15, i32* %18
%19 = load i8*, i8** %4
%20 = bitcast i8* %19 to i32*
%21 = getelementptr inbounds i32, i32* %20, i64 2
%22 = load i32, i32* %21
%23 = load i8*, i8** %3
%24 = bitcast i8* %23 to i32*
%25 = getelementptr inbounds i32, i32* %24, i64 2
store i32 %22, i32* %25
%26 = load i8*, i8** %4
%27 = bitcast i8* %26 to i32*
%28 = getelementptr inbounds i32, i32* %27, i64 3
%29 = load i32, i32* %28
%30 = load i8*, i8** %3
%31 = bitcast i8* %30 to i32*
%32 = getelementptr inbounds i32, i32* %31, i64 3
store i32 %29, i32* %32
ret void
}

LLVM IR (-O2):
define void @copy_block(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %0 to i32*
store i32 %4, i32* %5
%6 = getelementptr inbounds i8, i8* %1, i64 4
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = getelementptr inbounds i8, i8* %0, i64 4
%10 = bitcast i8* %9 to i32*
store i32 %8, i32* %10
%11 = getelementptr inbounds i8, i8* %1, i64 8
%12 = bitcast i8* %11 to i32*
%13 = load i32, i32* %12
%14 = getelementptr inbounds i8, i8* %0, i64 8
%15 = bitcast i8* %14 to i32*
store i32 %13, i32* %15
%16 = getelementptr inbounds i8, i8* %1, i64 12
%17 = bitcast i8* %16 to i32*
%18 = load i32, i32* %17
%19 = getelementptr inbounds i8, i8* %0, i64 12
%20 = bitcast i8* %19 to i32*
store i32 %18, i32* %20
ret void
}