void scalars_mob_poly_scale_SD_(int version, double a1, double *xa, double *ya,
                                double *yb, double *xc, double *yc, double *xg,
                                double *yg, double *yh, double *xm, double *ym,
                                double *zm) {
  (*xa) *= a1;
  (*ya) *= a1;
  if (version == 0)
    return;
  double a12 = a1 * a1;
  double a13 = a12 * a1;
  (*yb) *= a12;
  (*xc) *= a13;
  (*yc) *= a13;
  if (version == 1)
    return;
  (*xg) *= a12;
  (*yg) *= a12;
  (*yh) *= a13;
  (*xm) *= a13;
  (*ym) *= a13;
  (*zm) *= a13;
}


x86 assembly (clang, -O0):
<scalars_mob_poly_scale_SD_>:
push   %rbp
mov    %rsp,%rbp
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x20(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
cmpl   $0x0,-0x4(%rbp)
jne    1169 <scalars_mob_poly_scale_SD_+0x69>
jmp    122f <scalars_mob_poly_scale_SD_+0x12f>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x28(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x30(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x38(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
cmpl   $0x1,-0x4(%rbp)
jne    11c9 <scalars_mob_poly_scale_SD_+0xc9>
jmp    122f <scalars_mob_poly_scale_SD_+0x12f>
movsd  -0x40(%rbp),%xmm0
mov    0x10(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
mov    0x18(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    0x20(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    0x28(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    0x30(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    0x38(%rbp),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalars_mob_poly_scale_SD_>:
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi)
movsd  (%rdx),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdx)
test   %edi,%edi
je     11b9 <scalars_mob_poly_scale_SD_+0xb9>
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
movsd  (%rcx),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,(%rcx)
movsd  (%r8),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%r8)
movsd  (%r9),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%r9)
cmp    $0x1,%edi
je     11b9 <scalars_mob_poly_scale_SD_+0xb9>
mov    0x30(%rsp),%r8
mov    0x28(%rsp),%rcx
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%rsi
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rax
movsd  (%rax),%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,(%rax)
mulsd  (%rdi),%xmm1
movsd  %xmm1,(%rdi)
movsd  (%rsi),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsi)
movsd  (%rdx),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rdx)
movsd  (%rcx),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx)
mulsd  (%r8),%xmm0
movsd  %xmm0,(%r8)
ret

LLVM IR (-O0):
define void @scalars_mob_poly_scale_SD_(i32 %0, double %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10, double* %11, double* %12) {
%14 = alloca i32
%15 = alloca double
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
%23 = alloca double*
%24 = alloca double*
%25 = alloca double*
%26 = alloca double*
%27 = alloca double
%28 = alloca double
store i32 %0, i32* %14
store double %1, double* %15
store double* %2, double** %16
store double* %3, double** %17
store double* %4, double** %18
store double* %5, double** %19
store double* %6, double** %20
store double* %7, double** %21
store double* %8, double** %22
store double* %9, double** %23
store double* %10, double** %24
store double* %11, double** %25
store double* %12, double** %26
%29 = load double, double* %15
%30 = load double*, double** %16
%31 = load double, double* %30
%32 = fmul double %31, %29
store double %32, double* %30
%33 = load double, double* %15
%34 = load double*, double** %17
%35 = load double, double* %34
%36 = fmul double %35, %33
store double %36, double* %34
%37 = load i32, i32* %14
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %40
39: ; preds = %13
br label %87
40: ; preds = %13
%41 = load double, double* %15
%42 = load double, double* %15
%43 = fmul double %41, %42
store double %43, double* %27
%44 = load double, double* %27
%45 = load double, double* %15
%46 = fmul double %44, %45
store double %46, double* %28
%47 = load double, double* %27
%48 = load double*, double** %18
%49 = load double, double* %48
%50 = fmul double %49, %47
store double %50, double* %48
%51 = load double, double* %28
%52 = load double*, double** %19
%53 = load double, double* %52
%54 = fmul double %53, %51
store double %54, double* %52
%55 = load double, double* %28
%56 = load double*, double** %20
%57 = load double, double* %56
%58 = fmul double %57, %55
store double %58, double* %56
%59 = load i32, i32* %14
%60 = icmp eq i32 %59, 1
br i1 %60, label %61, label %62
61: ; preds = %40
br label %87
62: ; preds = %40
%63 = load double, double* %27
%64 = load double*, double** %21
%65 = load double, double* %64
%66 = fmul double %65, %63
store double %66, double* %64
%67 = load double, double* %27
%68 = load double*, double** %22
%69 = load double, double* %68
%70 = fmul double %69, %67
store double %70, double* %68
%71 = load double, double* %28
%72 = load double*, double** %23
%73 = load double, double* %72
%74 = fmul double %73, %71
store double %74, double* %72
%75 = load double, double* %28
%76 = load double*, double** %24
%77 = load double, double* %76
%78 = fmul double %77, %75
store double %78, double* %76
%79 = load double, double* %28
%80 = load double*, double** %25
%81 = load double, double* %80
%82 = fmul double %81, %79
store double %82, double* %80
%83 = load double, double* %28
%84 = load double*, double** %26
%85 = load double, double* %84
%86 = fmul double %85, %83
store double %86, double* %84
br label %87
87: ; preds = %62, %61, %39
ret void
}

LLVM IR (-O2):
define void @scalars_mob_poly_scale_SD_(i32 %0, double %1, double* nocapture %2, double* nocapture %3, double* nocapture %4, double* nocapture %5, double* nocapture %6, double* nocapture %7, double* nocapture %8, double* nocapture %9, double* nocapture %10, double* nocapture %11, double* nocapture %12) {
%14 = load double, double* %2
%15 = fmul double %14, %1
store double %15, double* %2
%16 = load double, double* %3
%17 = fmul double %16, %1
store double %17, double* %3
%18 = icmp eq i32 %0, 0
br i1 %18, label %42, label %19
19: ; preds = %13
%20 = fmul double %1, %1
%21 = fmul double %20, %1
%22 = load double, double* %4
%23 = fmul double %20, %22
store double %23, double* %4
%24 = load double, double* %5
%25 = fmul double %21, %24
store double %25, double* %5
%26 = load double, double* %6
%27 = fmul double %21, %26
store double %27, double* %6
%28 = icmp eq i32 %0, 1
br i1 %28, label %42, label %29
29: ; preds = %19
%30 = load double, double* %7
%31 = fmul double %20, %30
store double %31, double* %7
%32 = load double, double* %8
%33 = fmul double %20, %32
store double %33, double* %8
%34 = load double, double* %9
%35 = fmul double %21, %34
store double %35, double* %9
%36 = load double, double* %10
%37 = fmul double %21, %36
store double %37, double* %10
%38 = load double, double* %11
%39 = fmul double %21, %38
store double %39, double* %11
%40 = load double, double* %12
%41 = fmul double %21, %40
store double %41, double* %12
br label %42
42: ; preds = %29, %19, %13
ret void
}