#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 void *int64_t;

/* Variables and functions */
void aligned_block_copy(int64_t *__restrict dst_, int64_t *__restrict src,
                        int size) {
  volatile int64_t *dst = dst_;
  int64_t t1, t2, t3, t4;
  while ((size -= 64) >= 0) {
    t1 = *src++;
    t2 = *src++;
    t3 = *src++;
    t4 = *src++;
    *dst++ = t1;
    *dst++ = t2;
    *dst++ = t3;
    *dst++ = t4;
    t1 = *src++;
    t2 = *src++;
    t3 = *src++;
    t4 = *src++;
    *dst++ = t1;
    *dst++ = t2;
    *dst++ = t3;
    *dst++ = t4;
  }
}


x86 assembly (clang, -O0):
<aligned_block_copy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x40,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jl     128e <aligned_block_copy+0x18e>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,(%rax)
mov    -0x30(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,(%rax)
mov    -0x38(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,(%rax)
mov    -0x40(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,(%rax)
mov    -0x30(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,(%rax)
mov    -0x38(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,(%rax)
mov    -0x40(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x20(%rbp)
mov    %rcx,(%rax)
jmp    1117 <aligned_block_copy+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<aligned_block_copy>:
cmp    $0x40,%edx
jl     116a <aligned_block_copy+0x6a>
add    $0x40,%edx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
mov    (%rsi,%rax,1),%rcx
mov    0x8(%rsi,%rax,1),%r8
mov    0x10(%rsi,%rax,1),%r9
mov    0x18(%rsi,%rax,1),%r10
mov    %rcx,(%rdi,%rax,1)
mov    %r8,0x8(%rdi,%rax,1)
mov    %r9,0x10(%rdi,%rax,1)
mov    %r10,0x18(%rdi,%rax,1)
mov    0x20(%rsi,%rax,1),%rcx
mov    0x28(%rsi,%rax,1),%r8
mov    0x30(%rsi,%rax,1),%r9
mov    0x38(%rsi,%rax,1),%r10
mov    %rcx,0x20(%rdi,%rax,1)
mov    %r8,0x28(%rdi,%rax,1)
mov    %r9,0x30(%rdi,%rax,1)
mov    %r10,0x38(%rdi,%rax,1)
add    $0x40,%rax
add    $0xffffffc0,%edx
cmp    $0x7f,%edx
ja     1110 <aligned_block_copy+0x10>
ret

LLVM IR (-O0):
define void @aligned_block_copy(i8** noalias %0, i8** noalias %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
store i8** %0, i8*** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%12 = load i8**, i8*** %4
store i8** %12, i8*** %7
br label %13
13: ; preds = %17, %3
%14 = load i32, i32* %6
%15 = sub nsw i32 %14, 64
store i32 %15, i32* %6
%16 = icmp sge i32 %15, 0
br i1 %16, label %17, label %66
17: ; preds = %13
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i32 1
store i8** %19, i8*** %5
%20 = load i8*, i8** %18
store i8* %20, i8** %8
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i32 1
store i8** %22, i8*** %5
%23 = load i8*, i8** %21
store i8* %23, i8** %9
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i32 1
store i8** %25, i8*** %5
%26 = load i8*, i8** %24
store i8* %26, i8** %10
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i32 1
store i8** %28, i8*** %5
%29 = load i8*, i8** %27
store i8* %29, i8** %11
%30 = load i8*, i8** %8
%31 = load i8**, i8*** %7
%32 = getelementptr inbounds i8*, i8** %31, i32 1
store i8** %32, i8*** %7
store volatile i8* %30, i8** %31
%33 = load i8*, i8** %9
%34 = load i8**, i8*** %7
%35 = getelementptr inbounds i8*, i8** %34, i32 1
store i8** %35, i8*** %7
store volatile i8* %33, i8** %34
%36 = load i8*, i8** %10
%37 = load i8**, i8*** %7
%38 = getelementptr inbounds i8*, i8** %37, i32 1
store i8** %38, i8*** %7
store volatile i8* %36, i8** %37
%39 = load i8*, i8** %11
%40 = load i8**, i8*** %7
%41 = getelementptr inbounds i8*, i8** %40, i32 1
store i8** %41, i8*** %7
store volatile i8* %39, i8** %40
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i32 1
store i8** %43, i8*** %5
%44 = load i8*, i8** %42
store i8* %44, i8** %8
%45 = load i8**, i8*** %5
%46 = getelementptr inbounds i8*, i8** %45, i32 1
store i8** %46, i8*** %5
%47 = load i8*, i8** %45
store i8* %47, i8** %9
%48 = load i8**, i8*** %5
%49 = getelementptr inbounds i8*, i8** %48, i32 1
store i8** %49, i8*** %5
%50 = load i8*, i8** %48
store i8* %50, i8** %10
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i32 1
store i8** %52, i8*** %5
%53 = load i8*, i8** %51
store i8* %53, i8** %11
%54 = load i8*, i8** %8
%55 = load i8**, i8*** %7
%56 = getelementptr inbounds i8*, i8** %55, i32 1
store i8** %56, i8*** %7
store volatile i8* %54, i8** %55
%57 = load i8*, i8** %9
%58 = load i8**, i8*** %7
%59 = getelementptr inbounds i8*, i8** %58, i32 1
store i8** %59, i8*** %7
store volatile i8* %57, i8** %58
%60 = load i8*, i8** %10
%61 = load i8**, i8*** %7
%62 = getelementptr inbounds i8*, i8** %61, i32 1
store i8** %62, i8*** %7
store volatile i8* %60, i8** %61
%63 = load i8*, i8** %11
%64 = load i8**, i8*** %7
%65 = getelementptr inbounds i8*, i8** %64, i32 1
store i8** %65, i8*** %7
store volatile i8* %63, i8** %64
br label %13
66: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @aligned_block_copy(i8** noalias %0, i8** noalias nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 63
br i1 %4, label %5, label %35
5: ; preds = %3, %5
%6 = phi i8** [ %28, %5 ], [ %1, %3 ]
%7 = phi i32 [ %9, %5 ], [ %2, %3 ]
%8 = phi i8** [ %33, %5 ], [ %0, %3 ]
%9 = add nsw i32 %7, -64
%10 = getelementptr inbounds i8*, i8** %6, i64 1
%11 = load i8*, i8** %6
%12 = getelementptr inbounds i8*, i8** %6, i64 2
%13 = load i8*, i8** %10
%14 = getelementptr inbounds i8*, i8** %6, i64 3
%15 = load i8*, i8** %12
%16 = getelementptr inbounds i8*, i8** %6, i64 4
%17 = load i8*, i8** %14
%18 = getelementptr inbounds i8*, i8** %8, i64 1
store volatile i8* %11, i8** %8
%19 = getelementptr inbounds i8*, i8** %8, i64 2
store volatile i8* %13, i8** %18
%20 = getelementptr inbounds i8*, i8** %8, i64 3
store volatile i8* %15, i8** %19
%21 = getelementptr inbounds i8*, i8** %8, i64 4
store volatile i8* %17, i8** %20
%22 = getelementptr inbounds i8*, i8** %6, i64 5
%23 = load i8*, i8** %16
%24 = getelementptr inbounds i8*, i8** %6, i64 6
%25 = load i8*, i8** %22
%26 = getelementptr inbounds i8*, i8** %6, i64 7
%27 = load i8*, i8** %24
%28 = getelementptr inbounds i8*, i8** %6, i64 8
%29 = load i8*, i8** %26
%30 = getelementptr inbounds i8*, i8** %8, i64 5
store volatile i8* %23, i8** %21
%31 = getelementptr inbounds i8*, i8** %8, i64 6
store volatile i8* %25, i8** %30
%32 = getelementptr inbounds i8*, i8** %8, i64 7
store volatile i8* %27, i8** %31
%33 = getelementptr inbounds i8*, i8** %8, i64 8
store volatile i8* %29, i8** %32
%34 = icmp ugt i32 %7, 127
br i1 %34, label %5, label %35
35: ; preds = %5, %3
ret void
}