void swap_double_8(double *tndd8) {
  char *tnd8 = (char *)tndd8;
  char tnc;
  tnc = *tnd8;
  *tnd8 = *(tnd8 + 7);
  *(tnd8 + 7) = tnc;
  tnc = *(tnd8 + 1);
  *(tnd8 + 1) = *(tnd8 + 6);
  *(tnd8 + 6) = tnc;
  tnc = *(tnd8 + 2);
  *(tnd8 + 2) = *(tnd8 + 5);
  *(tnd8 + 5) = tnc;
  tnc = *(tnd8 + 3);
  *(tnd8 + 3) = *(tnd8 + 4);
  *(tnd8 + 4) = tnc;
}


x86 assembly (clang, -O0):
<swap_double_8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x7(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x7(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x6(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x6(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x5(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x5(%rax)
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_double_8>:
mov    (%rdi),%al
mov    0x7(%rdi),%cl
mov    %cl,(%rdi)
mov    %al,0x7(%rdi)
movzwl 0x1(%rdi),%eax
rol    $0x8,%ax
movzwl 0x5(%rdi),%ecx
rol    $0x8,%cx
mov    %cx,0x1(%rdi)
mov    %ax,0x5(%rdi)
rolw   $0x8,0x3(%rdi)
ret

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

LLVM IR (-O2):
define void @swap_double_8(double* nocapture %0) {
%2 = bitcast double* %0 to i8*
%3 = load i8, i8* %2
%4 = getelementptr inbounds i8, i8* %2, i64 7
%5 = load i8, i8* %4
store i8 %5, i8* %2
store i8 %3, i8* %4
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = load i8, i8* %6
%8 = getelementptr inbounds i8, i8* %2, i64 6
%9 = load i8, i8* %8
store i8 %9, i8* %6
store i8 %7, i8* %8
%10 = getelementptr inbounds i8, i8* %2, i64 2
%11 = load i8, i8* %10
%12 = getelementptr inbounds i8, i8* %2, i64 5
%13 = load i8, i8* %12
store i8 %13, i8* %10
store i8 %11, i8* %12
%14 = getelementptr inbounds i8, i8* %2, i64 3
%15 = load i8, i8* %14
%16 = getelementptr inbounds i8, i8* %2, i64 4
%17 = load i8, i8* %16
store i8 %17, i8* %14
store i8 %15, i8* %16
ret void
}