#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 cos(double);
void dcnids_xytolatlon(double lon0, double lat0, double x, double y,
                       double *lon, double *lat) {
  double dlat, dlon, avg_lat;
  dlat = y / 111.111;
  *lat = lat0 + dlat;
  avg_lat = (lat0 + dlat / 2.0) * 0.0174;
  dlon = x / (111.111 * cos(avg_lat));
  *lon = lon0 + dlon;
}


x86 assembly (clang, -O0):
<dcnids_xytolatlon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xebf(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
movsd  0xea2(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xe8a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1030 <cos@plt>
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
movsd  0xe55(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcnids_xytolatlon>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm2,(%rsp)
movsd  %xmm0,0x8(%rsp)
divsd  0xed5(%rip),%xmm3
movapd %xmm3,%xmm0
addsd  %xmm1,%xmm0
mulsd  0xecd(%rip),%xmm3
movsd  %xmm0,(%rsi)
addsd  %xmm1,%xmm3
mulsd  0xec5(%rip),%xmm3
movapd %xmm3,%xmm0
call   1030 <cos@plt>
mulsd  0xea4(%rip),%xmm0
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
addsd  0x8(%rsp),%xmm1
movsd  %xmm1,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @dcnids_xytolatlon(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
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
%16 = load double, double* %10
%17 = fdiv double %16, 1.111110e+02
store double %17, double* %13
%18 = load double, double* %8
%19 = load double, double* %13
%20 = fadd double %18, %19
%21 = load double*, double** %12
store double %20, double* %21
%22 = load double, double* %8
%23 = load double, double* %13
%24 = fdiv double %23, 2.000000e+00
%25 = fadd double %22, %24
%26 = fmul double %25, 1.740000e-02
store double %26, double* %15
%27 = load double, double* %9
%28 = load double, double* %15
%29 = call double @cos(double %28)
%30 = fmul double 1.111110e+02, %29
%31 = fdiv double %27, %30
store double %31, double* %14
%32 = load double, double* %7
%33 = load double, double* %14
%34 = fadd double %32, %33
%35 = load double*, double** %11
store double %34, double* %35
ret void
}

LLVM IR (-O2):
define void @dcnids_xytolatlon(double %0, double %1, double %2, double %3, double* nocapture writeonly %4, double* nocapture writeonly %5) {
%7 = fdiv double %3, 1.111110e+02
%8 = fadd double %7, %1
store double %8, double* %5
%9 = fmul double %7, 5.000000e-01
%10 = fadd double %9, %1
%11 = fmul double %10, 1.740000e-02
%12 = tail call double @cos(double %11)
%13 = fmul double %12, 1.111110e+02
%14 = fdiv double %2, %13
%15 = fadd double %14, %0
store double %15, double* %4
ret void
}