#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*/ bl_coord_vec(double *, double *);
void bl_coord(double *X, double *r, double *th, double *phi) {
  double V[(4)];
  bl_coord_vec(X, V);
  *r = V[1];
  *th = V[2];
  *phi = V[3];
  return;
}


x86 assembly (clang, -O0):
<bl_coord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <bl_coord_vec@plt>
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bl_coord>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rsp,%rsi
call   1030 <bl_coord_vec@plt>
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%r15)
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @bl_coord(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca [4 x double]
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%10 = load double*, double** %5
%11 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 0
%12 = call i32 @bl_coord_vec(double* %10, double* %11)
%13 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 1
%14 = load double, double* %13
%15 = load double*, double** %6
store double %14, double* %15
%16 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 2
%17 = load double, double* %16
%18 = load double*, double** %7
store double %17, double* %18
%19 = getelementptr inbounds [4 x double], [4 x double]* %9, i64 0, i64 3
%20 = load double, double* %19
%21 = load double*, double** %8
store double %20, double* %21
ret void
}

LLVM IR (-O2):
define void @bl_coord(double* %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = alloca [4 x double]
%6 = bitcast [4 x double]* %5 to i8*
%7 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%8 = call i32 @bl_coord_vec(double* %0, double* %7)
%9 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 1
%10 = load double, double* %9
store double %10, double* %1
%11 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 2
%12 = load double, double* %11
store double %12, double* %2
%13 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 3
%14 = load double, double* %13
store double %14, double* %3
ret void
}