#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*/ Convert_Geocentric_To_Geodetic(double const, double const,
                                                  double const, double *,
                                                  double *, double *);
int /*<<< orphan*/ Convert_Geodetic_To_Geocentric(double, double, double,
                                                  double *, double *, double *);
int /*<<< orphan*/ Geodetic_Shift_WGS72_To_WGS84(double, double, double,
                                                 double *, double *, double *);
int /*<<< orphan*/ Set_Geocentric_Parameters(double, double);
int /*<<< orphan*/ WGS72_Parameters(double *, double *);
int /*<<< orphan*/ WGS84_Parameters(double *, double *);
void Geocentric_Shift_WGS72_To_WGS84(const double X, const double Y,
                                     const double Z, double *X_WGS84,
                                     double *Y_WGS84, double *Z_WGS84) {
  double Lat_72;
  double Lon_72;
  double Hgt_72;
  double Lat_84;
  double Lon_84;
  double Hgt_84;
  double a_72;
  double f_72;
  double a_84;
  double f_84;
  WGS72_Parameters(&a_72, &f_72);
  Set_Geocentric_Parameters(a_72, f_72);
  Convert_Geocentric_To_Geodetic(X, Y, Z, &Lat_72, &Lon_72, &Hgt_72);
  Geodetic_Shift_WGS72_To_WGS84(Lat_72, Lon_72, Hgt_72, &Lat_84, &Lon_84,
                                &Hgt_84);
  WGS84_Parameters(&a_84, &f_84);
  Set_Geocentric_Parameters(a_84, f_84);
  Convert_Geodetic_To_Geocentric(Lat_84, Lon_84, Hgt_84, X_WGS84, Y_WGS84,
                                 Z_WGS84);
}


x86 assembly (clang, -O0):
<Geocentric_Shift_WGS72_To_WGS84>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
lea    -0x68(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1040 <WGS72_Parameters@plt>
movsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
call   1030 <Set_Geocentric_Parameters@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
lea    -0x38(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x48(%rbp),%rdx
call   1070 <Convert_Geocentric_To_Geodetic@plt>
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
lea    -0x50(%rbp),%rdi
lea    -0x58(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   1080 <Geodetic_Shift_WGS72_To_WGS84@plt>
lea    -0x78(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1060 <WGS84_Parameters@plt>
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
call   1030 <Set_Geocentric_Parameters@plt>
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1050 <Convert_Geodetic_To_Geocentric@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Geocentric_Shift_WGS72_To_WGS84>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
lea    0x38(%rsp),%rdi
lea    0x30(%rsp),%rsi
call   1040 <WGS72_Parameters@plt>
movsd  0x38(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
call   1030 <Set_Geocentric_Parameters@plt>
lea    0x68(%rsp),%rdi
lea    0x60(%rsp),%rsi
lea    0x58(%rsp),%rdx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
call   1070 <Convert_Geocentric_To_Geodetic@plt>
movsd  0x68(%rsp),%xmm0
movsd  0x60(%rsp),%xmm1
movsd  0x58(%rsp),%xmm2
lea    0x50(%rsp),%rdi
lea    0x48(%rsp),%rsi
lea    0x40(%rsp),%rdx
call   1080 <Geodetic_Shift_WGS72_To_WGS84@plt>
lea    0x28(%rsp),%rdi
lea    0x20(%rsp),%rsi
call   1060 <WGS84_Parameters@plt>
movsd  0x28(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
call   1030 <Set_Geocentric_Parameters@plt>
movsd  0x50(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
movsd  0x40(%rsp),%xmm2
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1050 <Convert_Geodetic_To_Geocentric@plt>
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @Geocentric_Shift_WGS72_To_WGS84(double %0, double %1, double %2, double* %3, double* %4, double* %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = bitcast double* %7 to i8*
%18 = bitcast double* %8 to i8*
%19 = bitcast double* %9 to i8*
%20 = bitcast double* %10 to i8*
%21 = bitcast double* %11 to i8*
%22 = bitcast double* %12 to i8*
%23 = bitcast double* %13 to i8*
%24 = bitcast double* %14 to i8*
%25 = bitcast double* %15 to i8*
%26 = bitcast double* %16 to i8*
%27 = call i32 @WGS72_Parameters(double* %13, double* %14)
%28 = load double, double* %13
%29 = load double, double* %14
%30 = call i32 @Set_Geocentric_Parameters(double %28, double %29)
%31 = call i32 @Convert_Geocentric_To_Geodetic(double %0, double %1, double %2, double* %7, double* %8, double* %9)
%32 = load double, double* %7
%33 = load double, double* %8
%34 = load double, double* %9
%35 = call i32 @Geodetic_Shift_WGS72_To_WGS84(double %32, double %33, double %34, double* %10, double* %11, double* %12)
%36 = call i32 @WGS84_Parameters(double* %15, double* %16)
%37 = load double, double* %15
%38 = load double, double* %16
%39 = call i32 @Set_Geocentric_Parameters(double %37, double %38)
%40 = load double, double* %10
%41 = load double, double* %11
%42 = load double, double* %12
%43 = call i32 @Convert_Geodetic_To_Geocentric(double %40, double %41, double %42, double* %3, double* %4, double* %5)
ret void
}