void __attribute__((no, noclone))
foo_int_16(int *__restrict__ in_, int *__restrict__ out_, int s) {
  int *in = __builtin_assume_aligned(in_, 16);
  int *out = __builtin_assume_aligned(out_, 16);
  for (int i = 0; i < 16; i++) {
    for (int j = 0; j < 16; ++j)
      out[j] = in[j];
    in += 16;
    out += s * 16;
  }
}


x86 assembly (clang, -O0):
<foo_int_16>:
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    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x10,-0x2c(%rbp)
jge    1197 <foo_int_16+0x97>
movl   $0x0,-0x30(%rbp)
cmpl   $0x10,-0x30(%rbp)
jge    1165 <foo_int_16+0x65>
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1137 <foo_int_16+0x37>
mov    -0x20(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%ecx
shl    $0x4,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1126 <foo_int_16+0x26>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_int_16>:
shl    $0x4,%edx
movslq %edx,%rax
movaps (%rdi),%xmm0
movaps 0x10(%rdi),%xmm1
movaps 0x20(%rdi),%xmm2
movaps 0x30(%rdi),%xmm3
movaps %xmm3,0x30(%rsi)
movaps %xmm2,0x20(%rsi)
movaps %xmm1,0x10(%rsi)
movaps %xmm0,(%rsi)
lea    (%rsi,%rax,4),%rcx
movaps 0x40(%rdi),%xmm0
movaps 0x50(%rdi),%xmm1
movaps 0x60(%rdi),%xmm2
movaps 0x70(%rdi),%xmm3
movaps %xmm3,0x30(%rsi,%rax,4)
movaps %xmm2,0x20(%rsi,%rax,4)
movaps %xmm1,0x10(%rsi,%rax,4)
movaps %xmm0,(%rsi,%rax,4)
lea    (%rcx,%rax,4),%rdx
movaps 0x80(%rdi),%xmm0
movaps 0x90(%rdi),%xmm1
movaps 0xa0(%rdi),%xmm2
movaps 0xb0(%rdi),%xmm3
movaps %xmm3,0x30(%rcx,%rax,4)
movaps %xmm2,0x20(%rcx,%rax,4)
movaps %xmm1,0x10(%rcx,%rax,4)
movaps %xmm0,(%rcx,%rax,4)
lea    (%rdx,%rax,4),%rcx
movaps 0xc0(%rdi),%xmm0
movaps 0xd0(%rdi),%xmm1
movaps 0xe0(%rdi),%xmm2
movaps 0xf0(%rdi),%xmm3
movaps %xmm3,0x30(%rdx,%rax,4)
movaps %xmm2,0x20(%rdx,%rax,4)
movaps %xmm1,0x10(%rdx,%rax,4)
movaps %xmm0,(%rdx,%rax,4)
lea    (%rcx,%rax,4),%rdx
movaps 0x100(%rdi),%xmm0
movaps 0x110(%rdi),%xmm1
movaps 0x120(%rdi),%xmm2
movaps 0x130(%rdi),%xmm3
movaps %xmm3,0x30(%rcx,%rax,4)
movaps %xmm2,0x20(%rcx,%rax,4)
movaps %xmm1,0x10(%rcx,%rax,4)
movaps %xmm0,(%rcx,%rax,4)
lea    (%rdx,%rax,4),%rcx
movaps 0x140(%rdi),%xmm0
movaps 0x150(%rdi),%xmm1
movaps 0x160(%rdi),%xmm2
movaps 0x170(%rdi),%xmm3
movaps %xmm3,0x30(%rdx,%rax,4)
movaps %xmm2,0x20(%rdx,%rax,4)
movaps %xmm1,0x10(%rdx,%rax,4)
movaps %xmm0,(%rdx,%rax,4)
lea    (%rcx,%rax,4),%rdx
movaps 0x180(%rdi),%xmm0
movaps 0x190(%rdi),%xmm1
movaps 0x1a0(%rdi),%xmm2
movaps 0x1b0(%rdi),%xmm3
movaps %xmm3,0x30(%rcx,%rax,4)
movaps %xmm2,0x20(%rcx,%rax,4)
movaps %xmm1,0x10(%rcx,%rax,4)
movaps %xmm0,(%rcx,%rax,4)
lea    (%rdx,%rax,4),%rcx
movaps 0x1c0(%rdi),%xmm0
movaps 0x1d0(%rdi),%xmm1
movaps 0x1e0(%rdi),%xmm2
movaps 0x1f0(%rdi),%xmm3
movaps %xmm0,(%rdx,%rax,4)
movaps %xmm1,0x10(%rdx,%rax,4)
movaps %xmm2,0x20(%rdx,%rax,4)
movaps %xmm3,0x30(%rdx,%rax,4)
lea    (%rcx,%rax,4),%rdx
movaps 0x200(%rdi),%xmm0
movaps 0x210(%rdi),%xmm1
movaps 0x220(%rdi),%xmm2
movaps 0x230(%rdi),%xmm3
movaps %xmm3,0x30(%rcx,%rax,4)
movaps %xmm2,0x20(%rcx,%rax,4)
movaps %xmm1,0x10(%rcx,%rax,4)
movaps %xmm0,(%rcx,%rax,4)
lea    (%rdx,%rax,4),%rcx
movaps 0x240(%rdi),%xmm0
movaps 0x250(%rdi),%xmm1
movaps 0x260(%rdi),%xmm2
movaps 0x270(%rdi),%xmm3
movaps %xmm3,0x30(%rdx,%rax,4)
movaps %xmm2,0x20(%rdx,%rax,4)
movaps %xmm1,0x10(%rdx,%rax,4)
movaps %xmm0,(%rdx,%rax,4)
lea    (%rcx,%rax,4),%rdx
movaps 0x280(%rdi),%xmm0
movaps 0x290(%rdi),%xmm1
movaps 0x2a0(%rdi),%xmm2
movaps 0x2b0(%rdi),%xmm3
movaps %xmm3,0x30(%rcx,%rax,4)
movaps %xmm2,0x20(%rcx,%rax,4)
movaps %xmm1,0x10(%rcx,%rax,4)
movaps %xmm0,(%rcx,%rax,4)
lea    (%rdx,%rax,4),%rcx
movaps 0x2c0(%rdi),%xmm0
movaps 0x2d0(%rdi),%xmm1
movaps 0x2e0(%rdi),%xmm2
movaps 0x2f0(%rdi),%xmm3
movaps %xmm3,0x30(%rdx,%rax,4)
movaps %xmm2,0x20(%rdx,%rax,4)
movaps %xmm1,0x10(%rdx,%rax,4)
movaps %xmm0,(%rdx,%rax,4)
lea    (%rcx,%rax,4),%rdx
movaps 0x300(%rdi),%xmm0
movaps 0x310(%rdi),%xmm1
movaps 0x320(%rdi),%xmm2
movaps 0x330(%rdi),%xmm3
movaps %xmm3,0x30(%rcx,%rax,4)
movaps %xmm2,0x20(%rcx,%rax,4)
movaps %xmm1,0x10(%rcx,%rax,4)
movaps %xmm0,(%rcx,%rax,4)
lea    (%rdx,%rax,4),%rcx
movaps 0x340(%rdi),%xmm0
movaps 0x350(%rdi),%xmm1
movaps 0x360(%rdi),%xmm2
movaps 0x370(%rdi),%xmm3
movaps %xmm3,0x30(%rdx,%rax,4)
movaps %xmm2,0x20(%rdx,%rax,4)
movaps %xmm1,0x10(%rdx,%rax,4)
movaps %xmm0,(%rdx,%rax,4)
lea    (%rcx,%rax,4),%rdx
movaps 0x380(%rdi),%xmm0
movaps 0x390(%rdi),%xmm1
movaps 0x3a0(%rdi),%xmm2
movaps 0x3b0(%rdi),%xmm3
movaps %xmm3,0x30(%rcx,%rax,4)
movaps %xmm2,0x20(%rcx,%rax,4)
movaps %xmm1,0x10(%rcx,%rax,4)
movaps %xmm0,(%rcx,%rax,4)
movaps 0x3c0(%rdi),%xmm0
movaps 0x3d0(%rdi),%xmm1
movaps 0x3e0(%rdi),%xmm2
movaps 0x3f0(%rdi),%xmm3
movaps %xmm3,0x30(%rdx,%rax,4)
movaps %xmm2,0x20(%rdx,%rax,4)
movaps %xmm1,0x10(%rdx,%rax,4)
movaps %xmm0,(%rdx,%rax,4)
ret

LLVM IR (-O0):
define void @foo_int_16(i32* noalias %0, i32* noalias %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%11 = load i32*, i32** %4
%12 = bitcast i32* %11 to i8*
%13 = bitcast i8* %12 to i32*
store i32* %13, i32** %7
%14 = load i32*, i32** %5
%15 = bitcast i32* %14 to i8*
%16 = bitcast i8* %15 to i32*
store i32* %16, i32** %8
store i32 0, i32* %9
br label %17
17: ; preds = %45, %3
%18 = load i32, i32* %9
%19 = icmp slt i32 %18, 16
br i1 %19, label %20, label %48
20: ; preds = %17
store i32 0, i32* %10
br label %21
21: ; preds = %34, %20
%22 = load i32, i32* %10
%23 = icmp slt i32 %22, 16
br i1 %23, label %24, label %37
24: ; preds = %21
%25 = load i32*, i32** %7
%26 = load i32, i32* %10
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %25, i64 %27
%29 = load i32, i32* %28
%30 = load i32*, i32** %8
%31 = load i32, i32* %10
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %30, i64 %32
store i32 %29, i32* %33
br label %34
34: ; preds = %24
%35 = load i32, i32* %10
%36 = add nsw i32 %35, 1
store i32 %36, i32* %10
br label %21
37: ; preds = %21
%38 = load i32*, i32** %7
%39 = getelementptr inbounds i32, i32* %38, i64 16
store i32* %39, i32** %7
%40 = load i32, i32* %6
%41 = mul nsw i32 %40, 16
%42 = load i32*, i32** %8
%43 = sext i32 %41 to i64
%44 = getelementptr inbounds i32, i32* %42, i64 %43
store i32* %44, i32** %8
br label %45
45: ; preds = %37
%46 = load i32, i32* %9
%47 = add nsw i32 %46, 1
store i32 %47, i32* %9
br label %17
48: ; preds = %17
ret void
}

LLVM IR (-O2):
define void @foo_int_16(i32* noalias %0, i32* noalias %1, i32 %2) {
%4 = bitcast i32* %0 to i8*
%5 = bitcast i32* %1 to i8*
%6 = shl nsw i32 %2, 4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 16
%9 = getelementptr inbounds i32, i32* %1, i64 %7
%10 = bitcast i32* %9 to i8*
%11 = bitcast i32* %8 to i8*
%12 = getelementptr inbounds i32, i32* %0, i64 32
%13 = getelementptr inbounds i32, i32* %9, i64 %7
%14 = bitcast i32* %13 to i8*
%15 = bitcast i32* %12 to i8*
%16 = getelementptr inbounds i32, i32* %0, i64 48
%17 = getelementptr inbounds i32, i32* %13, i64 %7
%18 = bitcast i32* %17 to i8*
%19 = bitcast i32* %16 to i8*
%20 = getelementptr inbounds i32, i32* %0, i64 64
%21 = getelementptr inbounds i32, i32* %17, i64 %7
%22 = bitcast i32* %21 to i8*
%23 = bitcast i32* %20 to i8*
%24 = getelementptr inbounds i32, i32* %0, i64 80
%25 = getelementptr inbounds i32, i32* %21, i64 %7
%26 = bitcast i32* %25 to i8*
%27 = bitcast i32* %24 to i8*
%28 = getelementptr inbounds i32, i32* %0, i64 96
%29 = getelementptr inbounds i32, i32* %25, i64 %7
%30 = bitcast i32* %29 to i8*
%31 = bitcast i32* %28 to i8*
%32 = getelementptr inbounds i32, i32* %0, i64 112
%33 = getelementptr inbounds i32, i32* %29, i64 %7
%34 = bitcast i32* %33 to i8*
%35 = bitcast i32* %32 to i8*
%36 = getelementptr inbounds i32, i32* %0, i64 128
%37 = getelementptr inbounds i32, i32* %33, i64 %7
%38 = bitcast i32* %37 to i8*
%39 = bitcast i32* %36 to i8*
%40 = getelementptr inbounds i32, i32* %0, i64 144
%41 = getelementptr inbounds i32, i32* %37, i64 %7
%42 = bitcast i32* %41 to i8*
%43 = bitcast i32* %40 to i8*
%44 = getelementptr inbounds i32, i32* %0, i64 160
%45 = getelementptr inbounds i32, i32* %41, i64 %7
%46 = bitcast i32* %45 to i8*
%47 = bitcast i32* %44 to i8*
%48 = getelementptr inbounds i32, i32* %0, i64 176
%49 = getelementptr inbounds i32, i32* %45, i64 %7
%50 = bitcast i32* %49 to i8*
%51 = bitcast i32* %48 to i8*
%52 = getelementptr inbounds i32, i32* %0, i64 192
%53 = getelementptr inbounds i32, i32* %49, i64 %7
%54 = bitcast i32* %53 to i8*
%55 = bitcast i32* %52 to i8*
%56 = getelementptr inbounds i32, i32* %0, i64 208
%57 = getelementptr inbounds i32, i32* %53, i64 %7
%58 = bitcast i32* %57 to i8*
%59 = bitcast i32* %56 to i8*
%60 = getelementptr inbounds i32, i32* %0, i64 224
%61 = getelementptr inbounds i32, i32* %57, i64 %7
%62 = bitcast i32* %61 to i8*
%63 = bitcast i32* %60 to i8*
%64 = getelementptr inbounds i32, i32* %0, i64 240
%65 = getelementptr inbounds i32, i32* %61, i64 %7
%66 = bitcast i32* %65 to i8*
%67 = bitcast i32* %64 to i8*
ret void
}