#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*/ drot3(double, double, double, double, double, double,
                         double *, double *, double *);
int /*<<< orphan*/ dtop3(double, double, double, double *, double *, double *);
int /*<<< orphan*/ ptod3(double, double, double, double *, double *, double *);
int prot3(double pro, double peo, double ppo, double phai, double thet,
          double psai, double *pr, double *pe, double *pp) {
  double dx, dy, dz, rdx, rdy, rdz;
  ptod3(pro, peo, ppo, &dx, &dy, &dz);
  drot3(dx, dy, dz, phai, thet, psai, &rdx, &rdy, &rdz);
  dtop3(rdx, rdy, rdz, pr, pe, pp);
  return 0;
}


x86 assembly (clang, -O0):
<prot3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
mov    %rdi,-0x38(%rbp)
mov    %rsi,-0x40(%rbp)
mov    %rdx,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    -0x50(%rbp),%rdi
lea    -0x58(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   1040 <ptod3@plt>
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
lea    -0x68(%rbp),%rdi
lea    -0x70(%rbp),%rsi
lea    -0x78(%rbp),%rdx
call   1050 <drot3@plt>
movsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm2
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%rdx
call   1030 <dtop3@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prot3>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
movsd  %xmm5,0x18(%rsp)
movsd  %xmm4,0x10(%rsp)
movsd  %xmm3,0x8(%rsp)
lea    0x48(%rsp),%rdi
lea    0x40(%rsp),%rsi
lea    0x38(%rsp),%rdx
call   1040 <ptod3@plt>
movsd  0x48(%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
movsd  0x38(%rsp),%xmm2
lea    0x30(%rsp),%rdi
lea    0x28(%rsp),%rsi
lea    0x20(%rsp),%rdx
movsd  0x8(%rsp),%xmm3
movsd  0x10(%rsp),%xmm4
movsd  0x18(%rsp),%xmm5
call   1050 <drot3@plt>
movsd  0x30(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <dtop3@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @prot3(double %0, double %1, double %2, double %3, double %4, double %5, double* %6, double* %7, double* %8) {
%10 = alloca double
%11 = alloca double
%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
%23 = alloca double
%24 = alloca double
store double %0, double* %10
store double %1, double* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double* %6, double** %16
store double* %7, double** %17
store double* %8, double** %18
%25 = load double, double* %10
%26 = load double, double* %11
%27 = load double, double* %12
%28 = call i32 @ptod3(double %25, double %26, double %27, double* %19, double* %20, double* %21)
%29 = load double, double* %19
%30 = load double, double* %20
%31 = load double, double* %21
%32 = load double, double* %13
%33 = load double, double* %14
%34 = load double, double* %15
%35 = call i32 @drot3(double %29, double %30, double %31, double %32, double %33, double %34, double* %22, double* %23, double* %24)
%36 = load double, double* %22
%37 = load double, double* %23
%38 = load double, double* %24
%39 = load double*, double** %16
%40 = load double*, double** %17
%41 = load double*, double** %18
%42 = call i32 @dtop3(double %36, double %37, double %38, double* %39, double* %40, double* %41)
ret i32 0
}

LLVM IR (-O2):
define i32 @prot3(double %0, double %1, double %2, double %3, double %4, double %5, double* %6, double* %7, double* %8) {
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = bitcast double* %10 to i8*
%17 = bitcast double* %11 to i8*
%18 = bitcast double* %12 to i8*
%19 = bitcast double* %13 to i8*
%20 = bitcast double* %14 to i8*
%21 = bitcast double* %15 to i8*
%22 = call i32 @ptod3(double %0, double %1, double %2, double* %10, double* %11, double* %12)
%23 = load double, double* %10
%24 = load double, double* %11
%25 = load double, double* %12
%26 = call i32 @drot3(double %23, double %24, double %25, double %3, double %4, double %5, double* %13, double* %14, double* %15)
%27 = load double, double* %13
%28 = load double, double* %14
%29 = load double, double* %15
%30 = call i32 @dtop3(double %27, double %28, double %29, double* %6, double* %7, double* %8)
ret i32 0
}