void mcsetstate(double x, double y, double z, double vx, double vy, double vz,
                double t, double sx, double sy, double sz, double p) {
  extern double mcnx, mcny, mcnz, mcnvx, mcnvy, mcnvz;
  extern double mcnt, mcnsx, mcnsy, mcnsz, mcnp;
  mcnx = x;
  mcny = y;
  mcnz = z;
  mcnvx = vx;
  mcnvy = vy;
  mcnvz = vz;
  mcnt = t;
  mcnsx = sx;
  mcnsy = sy;
  mcnsz = sz;
  mcnp = p;
}


x86 assembly (clang, -O0):
<mcsetstate>:
push   %rbp
mov    %rsp,%rbp
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2e6e(%rip),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    0x2e7e(%rip),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
mov    0x2e46(%rip),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
mov    0x2e26(%rip),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
mov    0x2e46(%rip),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
mov    0x2dfe(%rip),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
mov    0x2dfe(%rip),%rax
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
mov    0x2e3e(%rip),%rax
movsd  %xmm0,(%rax)
movsd  0x10(%rbp),%xmm0
mov    0x2dfe(%rip),%rax
movsd  %xmm0,(%rax)
movsd  0x18(%rbp),%xmm0
mov    0x2e16(%rip),%rax
movsd  %xmm0,(%rax)
movsd  0x20(%rbp),%xmm0
mov    0x2da6(%rip),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcsetstate>:
movsd  0x18(%rsp),%xmm8
movsd  0x10(%rsp),%xmm9
movsd  0x8(%rsp),%xmm10
mov    0x2e9c(%rip),%rax
movsd  %xmm0,(%rax)
mov    0x2eb1(%rip),%rax
movsd  %xmm1,(%rax)
mov    0x2e7e(%rip),%rax
movsd  %xmm2,(%rax)
mov    0x2e63(%rip),%rax
movsd  %xmm3,(%rax)
mov    0x2e88(%rip),%rax
movsd  %xmm4,(%rax)
mov    0x2e45(%rip),%rax
movsd  %xmm5,(%rax)
mov    0x2e4a(%rip),%rax
movsd  %xmm6,(%rax)
mov    0x2e8f(%rip),%rax
movsd  %xmm7,(%rax)
mov    0x2e54(%rip),%rax
movsd  %xmm10,(%rax)
mov    0x2e70(%rip),%rax
movsd  %xmm9,(%rax)
mov    0x2e04(%rip),%rax
movsd  %xmm8,(%rax)
ret

LLVM IR (-O0):
@mcnx = external global double
@mcny = external global double
@mcnz = external global double
@mcnvx = external global double
@mcnvy = external global double
@mcnvz = external global double
@mcnt = external global double
@mcnsx = external global double
@mcnsy = external global double
@mcnsz = external global double
@mcnp = external global double
define void @mcsetstate(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10) {
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
store double %0, double* %12
store double %1, double* %13
store double %2, double* %14
store double %3, double* %15
store double %4, double* %16
store double %5, double* %17
store double %6, double* %18
store double %7, double* %19
store double %8, double* %20
store double %9, double* %21
store double %10, double* %22
%23 = load double, double* %12
store double %23, double* @mcnx
%24 = load double, double* %13
store double %24, double* @mcny
%25 = load double, double* %14
store double %25, double* @mcnz
%26 = load double, double* %15
store double %26, double* @mcnvx
%27 = load double, double* %16
store double %27, double* @mcnvy
%28 = load double, double* %17
store double %28, double* @mcnvz
%29 = load double, double* %18
store double %29, double* @mcnt
%30 = load double, double* %19
store double %30, double* @mcnsx
%31 = load double, double* %20
store double %31, double* @mcnsy
%32 = load double, double* %21
store double %32, double* @mcnsz
%33 = load double, double* %22
store double %33, double* @mcnp
ret void
}

LLVM IR (-O2):
@mcnx = external global double
@mcny = external global double
@mcnz = external global double
@mcnvx = external global double
@mcnvy = external global double
@mcnvz = external global double
@mcnt = external global double
@mcnsx = external global double
@mcnsy = external global double
@mcnsz = external global double
@mcnp = external global double
define void @mcsetstate(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10) {
store double %0, double* @mcnx
store double %1, double* @mcny
store double %2, double* @mcnz
store double %3, double* @mcnvx
store double %4, double* @mcnvy
store double %5, double* @mcnvz
store double %6, double* @mcnt
store double %7, double* @mcnsx
store double %8, double* @mcnsy
store double %9, double* @mcnsz
store double %10, double* @mcnp
ret void
}