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

/* Variables and functions */
void copy_32_bytes(uint32_t *dst, uint32_t *src) {
  uint32_t count = 8;
  while (count--) {
    *dst++ = *src++;
  }
}


x86 assembly (clang, -O0):
<copy_32_bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x8,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     114e <copy_32_bytes+0x4e>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x8(%rbp)
mov    %ecx,(%rax)
jmp    1113 <copy_32_bytes+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_32_bytes>:
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)
mov    0x10(%rsi),%eax
mov    %eax,0x10(%rdi)
mov    0x14(%rsi),%eax
mov    %eax,0x14(%rdi)
mov    0x18(%rsi),%eax
mov    %eax,0x18(%rdi)
mov    0x1c(%rsi),%eax
mov    %eax,0x1c(%rdi)
ret

LLVM IR (-O0):
define void @copy_32_bytes(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 8, i32* %5
br label %6
6: ; preds = %10, %2
%7 = load i32, i32* %5
%8 = add nsw i32 %7, -1
store i32 %8, i32* %5
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i32 1
store i32* %12, i32** %4
%13 = load i32, i32* %11
%14 = load i32*, i32** %3
%15 = getelementptr inbounds i32, i32* %14, i32 1
store i32* %15, i32** %3
store i32 %13, i32* %14
br label %6
16: ; preds = %6
ret void
}

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