#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 */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, int);
void od_copy_8x8_8_c(unsigned char *_dst, int _dstride,
                     const unsigned char *_src, int _sstride) {
  int y;
  for (y = 0; y < 8; y++) {
    memcpy(_dst, _src, 8);
    _dst += _dstride;
    _src += _sstride;
  }
}


x86 assembly (clang, -O0):
<od_copy_8x8_8_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x8,-0x20(%rbp)
jge    1179 <od_copy_8x8_8_c+0x69>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    112d <od_copy_8x8_8_c+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<od_copy_8x8_8_c>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
movslq %esi,%r12
movslq %ecx,%r15
mov    %rdx,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    %r12,%rbx
add    %r15,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    %r12,%rbx
add    %r15,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    %r12,%rbx
add    %r15,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    %r12,%rbx
add    %r15,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    %r12,%rbx
add    %r15,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    %r12,%rbx
add    %r15,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
call   1030 <memcpy@plt>
add    %r12,%rbx
add    %r15,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x8,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @od_copy_8x8_8_c(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = sext i32 %1 to i64
%6 = sext i32 %3 to i64
%7 = tail call i32 @memcpy(i8* %0, i8* %2, i32 8)
%8 = getelementptr inbounds i8, i8* %0, i64 %5
%9 = getelementptr inbounds i8, i8* %2, i64 %6
%10 = tail call i32 @memcpy(i8* %8, i8* %9, i32 8)
%11 = getelementptr inbounds i8, i8* %8, i64 %5
%12 = getelementptr inbounds i8, i8* %9, i64 %6
%13 = tail call i32 @memcpy(i8* %11, i8* %12, i32 8)
%14 = getelementptr inbounds i8, i8* %11, i64 %5
%15 = getelementptr inbounds i8, i8* %12, i64 %6
%16 = tail call i32 @memcpy(i8* %14, i8* %15, i32 8)
%17 = getelementptr inbounds i8, i8* %14, i64 %5
%18 = getelementptr inbounds i8, i8* %15, i64 %6
%19 = tail call i32 @memcpy(i8* %17, i8* %18, i32 8)
%20 = getelementptr inbounds i8, i8* %17, i64 %5
%21 = getelementptr inbounds i8, i8* %18, i64 %6
%22 = tail call i32 @memcpy(i8* %20, i8* %21, i32 8)
%23 = getelementptr inbounds i8, i8* %20, i64 %5
%24 = getelementptr inbounds i8, i8* %21, i64 %6
%25 = tail call i32 @memcpy(i8* %23, i8* %24, i32 8)
%26 = getelementptr inbounds i8, i8* %23, i64 %5
%27 = getelementptr inbounds i8, i8* %24, i64 %6
%28 = tail call i32 @memcpy(i8* %26, i8* %27, i32 8)
ret void
}