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


x86 assembly (clang, -O0):
<foo_char_6>:
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    1191 <foo_char_6+0x91>
movl   $0x0,-0x30(%rbp)
cmpl   $0x6,-0x30(%rbp)
jge    1165 <foo_char_6+0x65>
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1137 <foo_char_6+0x37>
mov    -0x20(%rbp),%rax
add    $0x6,%rax
mov    %rax,-0x20(%rbp)
imul   $0x6,-0x14(%rbp),%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1126 <foo_char_6+0x26>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_char_6>:
add    %edx,%edx
lea    (%rdx,%rdx,2),%eax
cltq
movzwl 0x4(%rdi),%ecx
mov    %cx,0x4(%rsi)
mov    (%rdi),%ecx
mov    %ecx,(%rsi)
lea    (%rsi,%rax,1),%rcx
movzwl 0xa(%rdi),%edx
mov    %dx,0x4(%rsi,%rax,1)
mov    0x6(%rdi),%edx
mov    %edx,(%rsi,%rax,1)
lea    (%rcx,%rax,1),%rdx
movzwl 0x10(%rdi),%esi
mov    %si,0x4(%rax,%rcx,1)
mov    0xc(%rdi),%esi
mov    %esi,(%rax,%rcx,1)
lea    (%rdx,%rax,1),%rcx
movzwl 0x16(%rdi),%esi
mov    %si,0x4(%rax,%rdx,1)
mov    0x12(%rdi),%esi
mov    %esi,(%rax,%rdx,1)
lea    (%rcx,%rax,1),%rdx
movzwl 0x1c(%rdi),%esi
mov    %si,0x4(%rax,%rcx,1)
mov    0x18(%rdi),%esi
mov    %esi,(%rax,%rcx,1)
lea    (%rdx,%rax,1),%rcx
movzwl 0x22(%rdi),%esi
mov    %si,0x4(%rax,%rdx,1)
mov    0x1e(%rdi),%esi
mov    %esi,(%rax,%rdx,1)
lea    (%rcx,%rax,1),%rdx
movzwl 0x28(%rdi),%esi
mov    %si,0x4(%rax,%rcx,1)
mov    0x24(%rdi),%esi
mov    %esi,(%rax,%rcx,1)
lea    (%rdx,%rax,1),%rcx
movzwl 0x2e(%rdi),%esi
mov    %si,0x4(%rax,%rdx,1)
mov    0x2a(%rdi),%esi
mov    %esi,(%rax,%rdx,1)
lea    (%rcx,%rax,1),%rdx
movzwl 0x34(%rdi),%esi
mov    %si,0x4(%rax,%rcx,1)
mov    0x30(%rdi),%esi
mov    %esi,(%rax,%rcx,1)
lea    (%rdx,%rax,1),%rcx
movzwl 0x3a(%rdi),%esi
mov    %si,0x4(%rax,%rdx,1)
mov    0x36(%rdi),%esi
mov    %esi,(%rax,%rdx,1)
lea    (%rcx,%rax,1),%rdx
movzwl 0x40(%rdi),%esi
mov    %si,0x4(%rax,%rcx,1)
mov    0x3c(%rdi),%esi
mov    %esi,(%rax,%rcx,1)
lea    (%rdx,%rax,1),%rcx
movzwl 0x46(%rdi),%esi
mov    %si,0x4(%rax,%rdx,1)
mov    0x42(%rdi),%esi
mov    %esi,(%rax,%rdx,1)
lea    (%rcx,%rax,1),%rdx
movzwl 0x4c(%rdi),%esi
mov    %si,0x4(%rax,%rcx,1)
mov    0x48(%rdi),%esi
mov    %esi,(%rax,%rcx,1)
lea    (%rdx,%rax,1),%rcx
movzwl 0x52(%rdi),%esi
mov    %si,0x4(%rax,%rdx,1)
mov    0x4e(%rdi),%esi
mov    %esi,(%rax,%rdx,1)
lea    (%rcx,%rax,1),%rdx
movzwl 0x58(%rdi),%esi
mov    %si,0x4(%rax,%rcx,1)
mov    0x54(%rdi),%esi
mov    %esi,(%rax,%rcx,1)
movzwl 0x5e(%rdi),%ecx
mov    %cx,0x4(%rax,%rdx,1)
mov    0x5a(%rdi),%ecx
mov    %ecx,(%rax,%rdx,1)
ret

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

LLVM IR (-O2):
define void @foo_char_6(i8* noalias %0, i8* noalias %1, i32 %2) {
%4 = mul nsw i32 %2, 6
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 6
%7 = getelementptr inbounds i8, i8* %1, i64 %5
%8 = getelementptr inbounds i8, i8* %0, i64 12
%9 = getelementptr inbounds i8, i8* %7, i64 %5
%10 = getelementptr inbounds i8, i8* %0, i64 18
%11 = getelementptr inbounds i8, i8* %9, i64 %5
%12 = getelementptr inbounds i8, i8* %0, i64 24
%13 = getelementptr inbounds i8, i8* %11, i64 %5
%14 = getelementptr inbounds i8, i8* %0, i64 30
%15 = getelementptr inbounds i8, i8* %13, i64 %5
%16 = getelementptr inbounds i8, i8* %0, i64 36
%17 = getelementptr inbounds i8, i8* %15, i64 %5
%18 = getelementptr inbounds i8, i8* %0, i64 42
%19 = getelementptr inbounds i8, i8* %17, i64 %5
%20 = getelementptr inbounds i8, i8* %0, i64 48
%21 = getelementptr inbounds i8, i8* %19, i64 %5
%22 = getelementptr inbounds i8, i8* %0, i64 54
%23 = getelementptr inbounds i8, i8* %21, i64 %5
%24 = getelementptr inbounds i8, i8* %0, i64 60
%25 = getelementptr inbounds i8, i8* %23, i64 %5
%26 = getelementptr inbounds i8, i8* %0, i64 66
%27 = getelementptr inbounds i8, i8* %25, i64 %5
%28 = getelementptr inbounds i8, i8* %0, i64 72
%29 = getelementptr inbounds i8, i8* %27, i64 %5
%30 = getelementptr inbounds i8, i8* %0, i64 78
%31 = getelementptr inbounds i8, i8* %29, i64 %5
%32 = getelementptr inbounds i8, i8* %0, i64 84
%33 = getelementptr inbounds i8, i8* %31, i64 %5
%34 = getelementptr inbounds i8, i8* %0, i64 90
%35 = getelementptr inbounds i8, i8* %33, i64 %5
ret void
}