#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ calcplot1(double, double, double *, int);
int /*<<< orphan*/ calcplotp(double, double, double, double, double *);
void calcplot(double x, double y, double dx, double dy, double *r, double *g,
              double *b) {
  calcplot1(x, y, r, 1 / 64.0);
  calcplot1(x, y, g, 1 / 512.0);
  calcplot1(x, y, b, 1 / 4096.0);
  calcplotp(x, y, dx, dy, b);
}


x86 assembly (clang, -O0):
<calcplot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
mov    %rdx,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x28(%rbp),%rdi
xor    %esi,%esi
call   1030 <calcplot1@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x30(%rbp),%rdi
xor    %esi,%esi
call   1030 <calcplot1@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mov    -0x38(%rbp),%rdi
xor    %esi,%esi
call   1030 <calcplot1@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
mov    -0x38(%rbp),%rdi
call   1040 <calcplotp@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcplot>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%rbx
mov    %rsi,%r14
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %esi,%esi
call   1030 <calcplot1@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <calcplot1@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <calcplot1@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
mov    %rbx,%rdi
add    $0x28,%rsp
pop    %rbx
pop    %r14
jmp    1040 <calcplotp@plt>

LLVM IR (-O0):
define void @calcplot(double %0, double %1, double %2, double %3, double* %4, double* %5, double* %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
%15 = load double, double* %8
%16 = load double, double* %9
%17 = load double*, double** %12
%18 = call i32 @calcplot1(double %15, double %16, double* %17, i32 0)
%19 = load double, double* %8
%20 = load double, double* %9
%21 = load double*, double** %13
%22 = call i32 @calcplot1(double %19, double %20, double* %21, i32 0)
%23 = load double, double* %8
%24 = load double, double* %9
%25 = load double*, double** %14
%26 = call i32 @calcplot1(double %23, double %24, double* %25, i32 0)
%27 = load double, double* %8
%28 = load double, double* %9
%29 = load double, double* %10
%30 = load double, double* %11
%31 = load double*, double** %14
%32 = call i32 @calcplotp(double %27, double %28, double %29, double %30, double* %31)
ret void
}

LLVM IR (-O2):
define void @calcplot(double %0, double %1, double %2, double %3, double* %4, double* %5, double* %6) {
%8 = tail call i32 @calcplot1(double %0, double %1, double* %4, i32 0)
%9 = tail call i32 @calcplot1(double %0, double %1, double* %5, i32 0)
%10 = tail call i32 @calcplot1(double %0, double %1, double* %6, i32 0)
%11 = tail call i32 @calcplotp(double %0, double %1, double %2, double %3, double* %6)
ret void
}