#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*/ __ev_fabs(double);
double sin(double);
double sqrt(int /*<<< orphan*/);
void transform(double x, double y, double *lat, double *lng) {
  double xy = x * y;
  double absX = sqrt(__ev_fabs(x));
  double xPi = x * 3.141592653589793238462643;
  double yPi = y * 3.141592653589793238462643;
  double d = 20.0 * sin(6.0 * xPi) + 20.0 * sin(2.0 * xPi);
  *lat = d;
  *lng = d;
  *lat += 20.0 * sin(yPi) + 40.0 * sin(yPi / 3.0);
  *lng += 20.0 * sin(xPi) + 40.0 * sin(xPi / 3.0);
  *lat += 160.0 * sin(yPi / 12.0) + 320 * sin(yPi / 30.0);
  *lng += 150.0 * sin(xPi / 12.0) + 300.0 * sin(xPi / 30.0);
  *lat *= 2.0 / 3.0;
  *lng *= 2.0 / 3.0;
  *lat += -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * xy + 0.2 * absX;
  *lng += 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * xy + 0.1 * absX;
}


x86 assembly (clang, -O0):
<transform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <__ev_fabs@plt>
mov    %eax,%edi
call   1050 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  0xf01(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xed5(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  0xeb6(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm0
movsd  0xe8c(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe80(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xdfd(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x68(%rbp),%xmm0
movsd  0xe2c(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe18(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xda8(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x60(%rbp),%xmm0
movsd  0xdd7(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xdc3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
movsd  0xd8a(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xd67(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x58(%rbp),%xmm0
movsd  0xd66(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xd52(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
movsd  0xd29(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xd06(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
movsd  0xcbd(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xcd9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xcb1(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xc9d(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xc7c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xc63(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc4b(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xc1c(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xc17(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  0xbf3(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0xbd1(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xbb2(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xb9d(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transform>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x18(%rsp)
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x30(%rsp)
call   1030 <__ev_fabs@plt>
mov    %eax,%edi
call   1050 <sqrt@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0xe8f(%rip),%xmm0
movsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe73(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1040 <sin@plt>
movsd  0xe56(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  (%rsp),%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx)
movsd  %xmm2,(%r14)
movsd  0x8(%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0xe26(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xe21(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  0xe04(%rip),%xmm1
addsd  %xmm0,%xmm1
addsd  (%rbx),%xmm1
movsd  %xmm1,(%rbx)
movsd  0x10(%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
divsd  0xde2(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xddd(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  0xdc0(%rip),%xmm1
addsd  %xmm0,%xmm1
addsd  (%r14),%xmm1
movsd  %xmm1,(%r14)
movsd  0x8(%rsp),%xmm0
divsd  0xdbc(%rip),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0xdac(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xda7(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  0xda2(%rip),%xmm1
addsd  %xmm0,%xmm1
addsd  (%rbx),%xmm1
movsd  %xmm1,(%rbx)
movsd  0x10(%rsp),%xmm0
divsd  0xd70(%rip),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
divsd  0xd5f(%rip),%xmm0
call   1040 <sin@plt>
movsd  0xd6a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm2
mulsd  0xd60(%rip),%xmm2
addsd  %xmm0,%xmm2
addsd  (%r14),%xmm2
movsd  %xmm2,(%r14)
movsd  0xd52(%rip),%xmm0
movsd  (%rbx),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,(%rbx)
mulsd  (%r14),%xmm0
movsd  %xmm0,(%r14)
movsd  0x18(%rsp),%xmm7
movapd %xmm7,%xmm0
addsd  %xmm7,%xmm0
addsd  0xd2e(%rip),%xmm0
movsd  0x20(%rsp),%xmm3
movsd  0xcd8(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm2,%xmm4
movsd  0xd14(%rip),%xmm0
movapd %xmm3,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm3,%xmm2
movapd %xmm3,%xmm5
addsd  %xmm4,%xmm2
movsd  0xd00(%rip),%xmm3
movsd  0x30(%rsp),%xmm4
mulsd  %xmm3,%xmm4
addsd  %xmm4,%xmm2
movsd  0x28(%rsp),%xmm6
mulsd  %xmm6,%xmm0
addsd  %xmm2,%xmm0
addsd  (%rbx),%xmm0
movsd  %xmm0,(%rbx)
addsd  %xmm7,%xmm1
addsd  %xmm5,%xmm5
addsd  %xmm1,%xmm5
movapd %xmm7,%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm7,%xmm0
addsd  %xmm5,%xmm0
addsd  %xmm4,%xmm0
movapd %xmm6,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm0,%xmm1
addsd  (%r14),%xmm1
movsd  %xmm1,(%r14)
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

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

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