#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_64x64_16_c(unsigned char *_dst, int _dstride,
                        const unsigned char *_src, int _sstride) {
  int y;
  for (y = 0; y < 64; y++) {
    memcpy(_dst, _src, 64 << 1);
    _dst += _dstride;
    _src += _sstride;
  }
}


x86 assembly (clang, -O0):
<od_copy_64x64_16_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   $0x40,-0x20(%rbp)
jge    1179 <od_copy_64x64_16_c+0x69>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x80,%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_64x64_16_c+0x1d>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<od_copy_64x64_16_c>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rdi,%rbx
movslq %esi,%r15
movslq %ecx,%r12
mov    $0x40,%ebp
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x80,%edx
call   1030 <memcpy@plt>
add    %r15,%rbx
add    %r12,%r14
add    $0xffffffff,%ebp
jne    1130 <od_copy_64x64_16_c+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @od_copy_64x64_16_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, 64
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 128)
%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_64x64_16_c(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = sext i32 %1 to i64
%6 = sext i32 %3 to i64
br label %7
7: ; preds = %4, %7
%8 = phi i32 [ 0, %4 ], [ %14, %7 ]
%9 = phi i8* [ %0, %4 ], [ %12, %7 ]
%10 = phi i8* [ %2, %4 ], [ %13, %7 ]
%11 = tail call i32 @memcpy(i8* %9, i8* %10, i32 128)
%12 = getelementptr inbounds i8, i8* %9, i64 %5
%13 = getelementptr inbounds i8, i8* %10, i64 %6
%14 = add nuw nsw i32 %8, 1
%15 = icmp eq i32 %14, 64
br i1 %15, label %16, label %7
16: ; preds = %7
ret void
}