#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 */
double const M_PI;
int /*<<< orphan*/ fabs(double const);
double sin(double const);
double sqrt(int /*<<< orphan*/);
void wgs_gcj02_transform(const double lat, const double lng, double *dlat,
                         double *dlng) {
  const double lng_pi = lng * M_PI;
  const double lat_pi = lat * M_PI;
  const double lng_times_lat = lng * lat;
  *dlat = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat +
          0.1 * lng_times_lat + 0.2 * sqrt(fabs(lng)) +
          40.0 *
              (sin(6.0 * lng_pi) + sin(2.0 * lng_pi) + sin(lat_pi) +
               2.0 * sin(lat_pi / 3.0) + 8.0 * sin(lat_pi / 12.0) +
               16.0 * sin(lat_pi / 30.0)) /
              3.0;
  *dlng = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng_times_lat +
          0.1 * sqrt(fabs(lng)) +
          40.0 *
              (sin(6.0 * lng_pi) + sin(2.0 * lng_pi) + sin(lng_pi) +
               2.0 * sin(lng_pi / 3.0)) /
              3.0 +
          100.0 * sin(lng_pi / 12.0) + 200.0 * sin(lng_pi / 30.0);
}


x86 assembly (clang, -O0):
<wgs_gcj02_transform>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    0x2e8f(%rip),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2e7a(%rip),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xed1(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xe78(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xea8(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  0xe69(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %eax,%edi
call   1050 <sqrt@plt>
movsd  -0xa8(%rbp),%xmm1
ff
movsd  0xe58(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xe1b(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xdf9(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  0xd9a(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  -0x90(%rbp),%xmm1
ff
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  0xd64(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  -0x88(%rbp),%xmm1
ff
movsd  0xd8b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xd21(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  -0x80(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x78(%rbp),%xmm0
movsd  0xd4b(%rip),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movsd  0xd13(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xcff(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xd0f(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xced(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  0xcce(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %eax,%edi
call   1050 <sqrt@plt>
movsd  -0x70(%rbp),%xmm1
movsd  0xca3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xc86(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  0xc67(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xc14(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  -0x58(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
addsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
movsd  0xbf6(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xbe2(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xbc0(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  -0x48(%rbp),%xmm1
movsd  0xba2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xb80(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  -0x40(%rbp),%xmm1
movsd  0xb62(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wgs_gcj02_transform>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm1,%xmm4
movsd  %xmm0,0x40(%rsp)
xorpd  %xmm3,%xmm3
movapd %xmm1,%xmm2
mulsd  %xmm3,%xmm2
movsd  %xmm2,0x18(%rsp)
mulsd  %xmm0,%xmm3
movsd  %xmm3,(%rsp)
movapd %xmm0,%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm1,%xmm2
movsd  %xmm1,0x30(%rsp)
addsd  %xmm1,%xmm2
addsd  0xe80(%rip),%xmm2
movapd %xmm0,%xmm1
mulsd  0xe7c(%rip),%xmm1
addsd  %xmm2,%xmm1
movapd %xmm0,%xmm2
mulsd  0xe74(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
mulsd  0xe6c(%rip),%xmm3
movsd  %xmm3,0x10(%rsp)
addsd  %xmm3,%xmm2
movsd  %xmm2,0x20(%rsp)
movapd %xmm4,%xmm0
call   1030 <fabs@plt>
mov    %eax,%edi
call   1050 <sqrt@plt>
mulsd  0xe3c(%rip),%xmm0
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0xe38(%rip),%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
call   1040 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x38(%rsp)
call   1040 <sin@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1040 <sin@plt>
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
divsd  0xdc5(%rip),%xmm0
call   1040 <sin@plt>
addsd  %xmm0,%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
divsd  0xdc3(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xdbe(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
divsd  0xdad(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xda8(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
mulsd  0xda2(%rip),%xmm0
divsd  0xd5a(%rip),%xmm0
addsd  0x28(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0xd90(%rip),%xmm0
movsd  0x30(%rsp),%xmm1
addsd  %xmm1,%xmm0
movsd  0x40(%rsp),%xmm2
addsd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm1,%xmm3
mulsd  0xd34(%rip),%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm1,%xmm0
addsd  %xmm2,%xmm3
addsd  0x10(%rsp),%xmm3
movsd  %xmm3,(%rsp)
call   1030 <fabs@plt>
mov    %eax,%edi
call   1050 <sqrt@plt>
mulsd  0xd09(%rip),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x20(%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x38(%rsp),%xmm0
call   1040 <sin@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
call   1040 <sin@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
divsd  0xca2(%rip),%xmm0
call   1040 <sin@plt>
addsd  %xmm0,%xmm0
addsd  0x10(%rsp),%xmm0
mulsd  0xccb(%rip),%xmm0
divsd  0xc83(%rip),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm0
divsd  0xc8b(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xcae(%rip),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm0
divsd  0xc76(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xc91(%rip),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@M_PI = constant double 0.000000e+00
define void @wgs_gcj02_transform(double %0, double %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
%11 = alloca double
store double %0, double* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%12 = load double, double* %6
%13 = load double, double* @M_PI
%14 = fmul double %12, %13
store double %14, double* %9
%15 = load double, double* %5
%16 = load double, double* @M_PI
%17 = fmul double %15, %16
store double %17, double* %10
%18 = load double, double* %6
%19 = load double, double* %5
%20 = fmul double %18, %19
store double %20, double* %11
%21 = load double, double* %6
%22 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %21, double -1.000000e+02)
%23 = load double, double* %5
%24 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %23, double %22)
%25 = load double, double* %5
%26 = fmul double 2.000000e-01, %25
%27 = load double, double* %5
%28 = call double @llvm.fmuladd.f64(double %26, double %27, double %24)
%29 = load double, double* %11
%30 = call double @llvm.fmuladd.f64(double 1.000000e-01, double %29, double %28)
%31 = load double, double* %6
%32 = call i32 @fabs(double %31)
%33 = call double @sqrt(i32 %32)
%34 = call double @llvm.fmuladd.f64(double 2.000000e-01, double %33, double %30)
%35 = load double, double* %9
%36 = fmul double 6.000000e+00, %35
%37 = call double @sin(double %36)
%38 = load double, double* %9
%39 = fmul double 2.000000e+00, %38
%40 = call double @sin(double %39)
%41 = fadd double %37, %40
%42 = load double, double* %10
%43 = call double @sin(double %42)
%44 = fadd double %41, %43
%45 = load double, double* %10
%46 = fdiv double %45, 3.000000e+00
%47 = call double @sin(double %46)
%48 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %47, double %44)
%49 = load double, double* %10
%50 = fdiv double %49, 1.200000e+01
%51 = call double @sin(double %50)
%52 = call double @llvm.fmuladd.f64(double 8.000000e+00, double %51, double %48)
%53 = load double, double* %10
%54 = fdiv double %53, 3.000000e+01
%55 = call double @sin(double %54)
%56 = call double @llvm.fmuladd.f64(double 1.600000e+01, double %55, double %52)
%57 = fmul double 4.000000e+01, %56
%58 = fdiv double %57, 3.000000e+00
%59 = fadd double %34, %58
%60 = load double*, double** %7
store double %59, double* %60
%61 = load double, double* %6
%62 = fadd double 3.000000e+02, %61
%63 = load double, double* %5
%64 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %63, double %62)
%65 = load double, double* %6
%66 = fmul double 1.000000e-01, %65
%67 = load double, double* %6
%68 = call double @llvm.fmuladd.f64(double %66, double %67, double %64)
%69 = load double, double* %11
%70 = call double @llvm.fmuladd.f64(double 1.000000e-01, double %69, double %68)
%71 = load double, double* %6
%72 = call i32 @fabs(double %71)
%73 = call double @sqrt(i32 %72)
%74 = call double @llvm.fmuladd.f64(double 1.000000e-01, double %73, double %70)
%75 = load double, double* %9
%76 = fmul double 6.000000e+00, %75
%77 = call double @sin(double %76)
%78 = load double, double* %9
%79 = fmul double 2.000000e+00, %78
%80 = call double @sin(double %79)
%81 = fadd double %77, %80
%82 = load double, double* %9
%83 = call double @sin(double %82)
%84 = fadd double %81, %83
%85 = load double, double* %9
%86 = fdiv double %85, 3.000000e+00
%87 = call double @sin(double %86)
%88 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %87, double %84)
%89 = fmul double 4.000000e+01, %88
%90 = fdiv double %89, 3.000000e+00
%91 = fadd double %74, %90
%92 = load double, double* %9
%93 = fdiv double %92, 1.200000e+01
%94 = call double @sin(double %93)
%95 = call double @llvm.fmuladd.f64(double 1.000000e+02, double %94, double %91)
%96 = load double, double* %9
%97 = fdiv double %96, 3.000000e+01
%98 = call double @sin(double %97)
%99 = call double @llvm.fmuladd.f64(double 2.000000e+02, double %98, double %95)
%100 = load double*, double** %8
store double %99, double* %100
ret void
}

LLVM IR (-O2):
@M_PI = constant double 0.000000e+00
define void @wgs_gcj02_transform(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = fmul double %1, 0.000000e+00
%6 = fmul double %0, 0.000000e+00
%7 = fmul double %0, %1
%8 = tail call double @llvm.fmuladd.f64(double %1, double 2.000000e+00, double -1.000000e+02)
%9 = tail call double @llvm.fmuladd.f64(double %0, double 3.000000e+00, double %8)
%10 = fmul double %0, 2.000000e-01
%11 = tail call double @llvm.fmuladd.f64(double %10, double %0, double %9)
%12 = tail call double @llvm.fmuladd.f64(double %7, double 1.000000e-01, double %11)
%13 = tail call i32 @fabs(double %1)
%14 = tail call double @sqrt(i32 %13)
%15 = tail call double @llvm.fmuladd.f64(double %14, double 2.000000e-01, double %12)
%16 = fmul double %5, 6.000000e+00
%17 = tail call double @sin(double %16)
%18 = fmul double %5, 2.000000e+00
%19 = tail call double @sin(double %18)
%20 = fadd double %17, %19
%21 = tail call double @sin(double %6)
%22 = fadd double %20, %21
%23 = fdiv double %6, 3.000000e+00
%24 = tail call double @sin(double %23)
%25 = tail call double @llvm.fmuladd.f64(double %24, double 2.000000e+00, double %22)
%26 = fdiv double %6, 1.200000e+01
%27 = tail call double @sin(double %26)
%28 = tail call double @llvm.fmuladd.f64(double %27, double 8.000000e+00, double %25)
%29 = fdiv double %6, 3.000000e+01
%30 = tail call double @sin(double %29)
%31 = tail call double @llvm.fmuladd.f64(double %30, double 1.600000e+01, double %28)
%32 = fmul double %31, 4.000000e+01
%33 = fdiv double %32, 3.000000e+00
%34 = fadd double %15, %33
store double %34, double* %2
%35 = fadd double %1, 3.000000e+02
%36 = tail call double @llvm.fmuladd.f64(double %0, double 2.000000e+00, double %35)
%37 = fmul double %1, 1.000000e-01
%38 = tail call double @llvm.fmuladd.f64(double %37, double %1, double %36)
%39 = tail call double @llvm.fmuladd.f64(double %7, double 1.000000e-01, double %38)
%40 = tail call i32 @fabs(double %1)
%41 = tail call double @sqrt(i32 %40)
%42 = tail call double @llvm.fmuladd.f64(double %41, double 1.000000e-01, double %39)
%43 = tail call double @sin(double %16)
%44 = tail call double @sin(double %18)
%45 = fadd double %43, %44
%46 = tail call double @sin(double %5)
%47 = fadd double %45, %46
%48 = fdiv double %5, 3.000000e+00
%49 = tail call double @sin(double %48)
%50 = tail call double @llvm.fmuladd.f64(double %49, double 2.000000e+00, double %47)
%51 = fmul double %50, 4.000000e+01
%52 = fdiv double %51, 3.000000e+00
%53 = fadd double %42, %52
%54 = fdiv double %5, 1.200000e+01
%55 = tail call double @sin(double %54)
%56 = tail call double @llvm.fmuladd.f64(double %55, double 1.000000e+02, double %53)
%57 = fdiv double %5, 3.000000e+01
%58 = tail call double @sin(double %57)
%59 = tail call double @llvm.fmuladd.f64(double %58, double 2.000000e+02, double %56)
store double %59, double* %3
ret void
}