#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 M_PI;
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 * M_PI;
  double yPi = y * M_PI;
  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  -0x8(%rbp),%xmm0
mov    0x2e6d(%rip),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    0x2e58(%rip),%rax
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xecf(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  0xeb0(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm0
movsd  0xe86(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe7a(%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  0xdf7(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x68(%rbp),%xmm0
movsd  0xe26(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe12(%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  0xda2(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x60(%rbp),%xmm0
movsd  0xdd1(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xdbd(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
movsd  0xd84(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xd61(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x58(%rbp),%xmm0
movsd  0xd60(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xd4c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
movsd  0xd23(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xd00(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
movsd  0xcb7(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xcd3(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xcab(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xc97(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xc76(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xc5d(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc45(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xc16(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xc11(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  0xbed(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
addsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0xbcb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  0xbac(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
movsd  0xb97(%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)
mov    0x2e78(%rip),%rax
movsd  (%rax),%xmm0
movapd %xmm0,%xmm1
mulsd  0x18(%rsp),%xmm1
movsd  %xmm1,0x10(%rsp)
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe68(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1040 <sin@plt>
movsd  0xe4b(%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  0xe1b(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xe16(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  0xdf9(%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  0xdd7(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xdd2(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  0xdb5(%rip),%xmm1
addsd  %xmm0,%xmm1
addsd  (%r14),%xmm1
movsd  %xmm1,(%r14)
movsd  0x8(%rsp),%xmm0
divsd  0xdb1(%rip),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0xda1(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xd9c(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  0xd97(%rip),%xmm1
addsd  %xmm0,%xmm1
addsd  (%rbx),%xmm1
movsd  %xmm1,(%rbx)
movsd  0x10(%rsp),%xmm0
divsd  0xd65(%rip),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
divsd  0xd54(%rip),%xmm0
call   1040 <sin@plt>
movsd  0xd5f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x8(%rsp),%xmm2
mulsd  0xd55(%rip),%xmm2
addsd  %xmm0,%xmm2
addsd  (%r14),%xmm2
movsd  %xmm2,(%r14)
movsd  0xd47(%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  0xd23(%rip),%xmm0
movsd  0x20(%rsp),%xmm3
movsd  0xccd(%rip),%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm0,%xmm2
movapd %xmm2,%xmm4
movsd  0xd09(%rip),%xmm0
movapd %xmm3,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm3,%xmm2
movapd %xmm3,%xmm5
addsd  %xmm4,%xmm2
movsd  0xcf5(%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):
@M_PI = global double 0.000000e+00
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 = load double, double* @M_PI
%22 = fmul double %20, %21
store double %22, double* %11
%23 = load double, double* %6
%24 = load double, double* @M_PI
%25 = fmul double %23, %24
store double %25, double* %12
%26 = load double, double* %11
%27 = fmul double 6.000000e+00, %26
%28 = call double @sin(double %27)
%29 = load double, double* %11
%30 = fmul double 2.000000e+00, %29
%31 = call double @sin(double %30)
%32 = fmul double 2.000000e+01, %31
%33 = call double @llvm.fmuladd.f64(double 2.000000e+01, double %28, double %32)
store double %33, double* %13
%34 = load double, double* %13
%35 = load double*, double** %7
store double %34, double* %35
%36 = load double, double* %13
%37 = load double*, double** %8
store double %36, double* %37
%38 = load double, double* %12
%39 = call double @sin(double %38)
%40 = load double, double* %12
%41 = fdiv double %40, 3.000000e+00
%42 = call double @sin(double %41)
%43 = fmul double 4.000000e+01, %42
%44 = call double @llvm.fmuladd.f64(double 2.000000e+01, double %39, double %43)
%45 = load double*, double** %7
%46 = load double, double* %45
%47 = fadd double %46, %44
store double %47, double* %45
%48 = load double, double* %11
%49 = call double @sin(double %48)
%50 = load double, double* %11
%51 = fdiv double %50, 3.000000e+00
%52 = call double @sin(double %51)
%53 = fmul double 4.000000e+01, %52
%54 = call double @llvm.fmuladd.f64(double 2.000000e+01, double %49, double %53)
%55 = load double*, double** %8
%56 = load double, double* %55
%57 = fadd double %56, %54
store double %57, double* %55
%58 = load double, double* %12
%59 = fdiv double %58, 1.200000e+01
%60 = call double @sin(double %59)
%61 = load double, double* %12
%62 = fdiv double %61, 3.000000e+01
%63 = call double @sin(double %62)
%64 = fmul double 3.200000e+02, %63
%65 = call double @llvm.fmuladd.f64(double 1.600000e+02, double %60, double %64)
%66 = load double*, double** %7
%67 = load double, double* %66
%68 = fadd double %67, %65
store double %68, double* %66
%69 = load double, double* %11
%70 = fdiv double %69, 1.200000e+01
%71 = call double @sin(double %70)
%72 = load double, double* %11
%73 = fdiv double %72, 3.000000e+01
%74 = call double @sin(double %73)
%75 = fmul double 3.000000e+02, %74
%76 = call double @llvm.fmuladd.f64(double 1.500000e+02, double %71, double %75)
%77 = load double*, double** %8
%78 = load double, double* %77
%79 = fadd double %78, %76
store double %79, double* %77
%80 = load double*, double** %7
%81 = load double, double* %80
%82 = fmul double %81, 0x3FE5555555555555
store double %82, double* %80
%83 = load double*, double** %8
%84 = load double, double* %83
%85 = fmul double %84, 0x3FE5555555555555
store double %85, double* %83
%86 = load double, double* %5
%87 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %86, double -1.000000e+02)
%88 = load double, double* %6
%89 = call double @llvm.fmuladd.f64(double 3.000000e+00, double %88, double %87)
%90 = load double, double* %6
%91 = fmul double 2.000000e-01, %90
%92 = load double, double* %6
%93 = call double @llvm.fmuladd.f64(double %91, double %92, double %89)
%94 = load double, double* %9
%95 = call double @llvm.fmuladd.f64(double 1.000000e-01, double %94, double %93)
%96 = load double, double* %10
%97 = call double @llvm.fmuladd.f64(double 2.000000e-01, double %96, double %95)
%98 = load double*, double** %7
%99 = load double, double* %98
%100 = fadd double %99, %97
store double %100, double* %98
%101 = load double, double* %5
%102 = fadd double 3.000000e+02, %101
%103 = load double, double* %6
%104 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %103, double %102)
%105 = load double, double* %5
%106 = fmul double 1.000000e-01, %105
%107 = load double, double* %5
%108 = call double @llvm.fmuladd.f64(double %106, double %107, double %104)
%109 = load double, double* %9
%110 = call double @llvm.fmuladd.f64(double 1.000000e-01, double %109, double %108)
%111 = load double, double* %10
%112 = call double @llvm.fmuladd.f64(double 1.000000e-01, double %111, double %110)
%113 = load double*, double** %8
%114 = load double, double* %113
%115 = fadd double %114, %112
store double %115, double* %113
ret void
}

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