void exchng(dots, m, n, point, lfor) double ***dots;
int m, n;
double point[2][4];
short int lfor;
{
  register int l;
  if (lfor) {
    for (l = 1; l <= 3; l++)
      point[1][l] = dots[m][n][l];
  } else {
    for (l = 1; l <= 3; l++)
      dots[m][n][l] = point[1][l];
  }
}


x86 assembly (clang, -O0):
<exchng>:
push   %rbp
mov    %rsp,%rbp
mov    %r8w,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %ax,-0x1a(%rbp)
cmpw   $0x0,-0x1a(%rbp)
je     1174 <exchng+0x74>
movl   $0x1,-0x20(%rbp)
cmpl   $0x3,-0x20(%rbp)
jg     116f <exchng+0x6f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,0x20(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    112c <exchng+0x2c>
jmp    11c3 <exchng+0xc3>
movl   $0x1,-0x20(%rbp)
cmpl   $0x3,-0x20(%rbp)
jg     11be <exchng+0xbe>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  0x20(%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    117b <exchng+0x7b>
jmp    11c3 <exchng+0xc3>
pop    %rbp
ret

x86 assembly (clang, -O2):
<exchng>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rax
movslq %edx,%rdx
mov    (%rax,%rdx,8),%rax
test   %r8w,%r8w
je     1133 <exchng+0x33>
movsd  0x8(%rax),%xmm0
movsd  %xmm0,0x28(%rcx)
movsd  0x10(%rax),%xmm0
movsd  %xmm0,0x30(%rcx)
movsd  0x18(%rax),%xmm0
movsd  %xmm0,0x38(%rcx)
ret
movsd  0x28(%rcx),%xmm0
movsd  %xmm0,0x8(%rax)
movsd  0x30(%rcx),%xmm0
movsd  %xmm0,0x10(%rax)
movsd  0x38(%rcx),%xmm0
movsd  %xmm0,0x18(%rax)
ret

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

LLVM IR (-O2):
define void @exchng(double*** nocapture %0, i32 %1, i32 %2, [4 x double]* nocapture %3, i32 %4) {
%6 = trunc i32 %4 to i16
%7 = icmp eq i16 %6, 0
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds double**, double*** %0, i64 %8
%10 = load double**, double*** %9
%11 = sext i32 %2 to i64
%12 = getelementptr inbounds double*, double** %10, i64 %11
%13 = load double*, double** %12
br i1 %7, label %24, label %14
14: ; preds = %5
%15 = getelementptr inbounds double, double* %13, i64 1
%16 = load double, double* %15
%17 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 1, i64 1
store double %16, double* %17
%18 = getelementptr inbounds double, double* %13, i64 2
%19 = load double, double* %18
%20 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 1, i64 2
store double %19, double* %20
%21 = getelementptr inbounds double, double* %13, i64 3
%22 = load double, double* %21
%23 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 1, i64 3
store double %22, double* %23
br label %34
24: ; preds = %5
%25 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 1, i64 1
%26 = load double, double* %25
%27 = getelementptr inbounds double, double* %13, i64 1
store double %26, double* %27
%28 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 1, i64 2
%29 = load double, double* %28
%30 = getelementptr inbounds double, double* %13, i64 2
store double %29, double* %30
%31 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 1, i64 3
%32 = load double, double* %31
%33 = getelementptr inbounds double, double* %13, i64 3
store double %32, double* %33
br label %34
34: ; preds = %14, %24
ret void
}