#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 */
float M_PI;
float sinf(float);
void _get_frame(float lat, float lng, float alt, float *d_dlat, float *d_dlng) {
  float theta, r;
  theta = 2.f * M_PI * (90.f - lat) / 360.f;
  r = 6371009.f + alt;
  *d_dlat = (2.f * M_PI) * r / 360.f;
  *d_dlng = (2.f * M_PI) * r * sinf(theta) / 360.f;
}


x86 assembly (clang, -O0):
<_get_frame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movss  0xecd(%rip),%xmm0
mov    0x2eaa(%rip),%rax
mulss  (%rax),%xmm0
movss  0xec2(%rip),%xmm1
subss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xea5(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  0xe9c(%rip),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  0xe86(%rip),%xmm0
mov    0x2e63(%rip),%rax
mulss  (%rax),%xmm0
mulss  -0x28(%rbp),%xmm0
movss  0xe6a(%rip),%xmm1
divss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
movss  0xe5a(%rip),%xmm0
mov    0x2e37(%rip),%rax
mulss  (%rax),%xmm0
mulss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x24(%rbp),%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm1
movss  -0x2c(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  0xe23(%rip),%xmm1
divss  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_frame>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    0x2ec9(%rip),%rax
movss  (%rax),%xmm3
addss  %xmm3,%xmm3
movss  0xed1(%rip),%xmm1
subss  %xmm0,%xmm1
mulss  %xmm3,%xmm1
movss  0xec5(%rip),%xmm0
divss  %xmm0,%xmm1
addss  0xebd(%rip),%xmm2
mulss  %xmm2,%xmm3
divss  %xmm0,%xmm3
movss  %xmm3,(%rdi)
movss  (%rax),%xmm0
addss  %xmm0,%xmm0
mulss  %xmm2,%xmm0
movss  %xmm0,0xc(%rsp)
movaps %xmm1,%xmm0
call   1030 <sinf@plt>
mulss  0xc(%rsp),%xmm0
divss  0xe85(%rip),%xmm0
movss  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@M_PI = global float 0.000000e+00
define void @_get_frame(float %0, float %1, float %2, float* %3, float* %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float*
%10 = alloca float*
%11 = alloca float
%12 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float* %3, float** %9
store float* %4, float** %10
%13 = load float, float* @M_PI
%14 = fmul float 2.000000e+00, %13
%15 = load float, float* %6
%16 = fsub float 9.000000e+01, %15
%17 = fmul float %14, %16
%18 = fdiv float %17, 3.600000e+02
store float %18, float* %11
%19 = load float, float* %8
%20 = fadd float 0x41584DB040000000, %19
store float %20, float* %12
%21 = load float, float* @M_PI
%22 = fmul float 2.000000e+00, %21
%23 = load float, float* %12
%24 = fmul float %22, %23
%25 = fdiv float %24, 3.600000e+02
%26 = load float*, float** %9
store float %25, float* %26
%27 = load float, float* @M_PI
%28 = fmul float 2.000000e+00, %27
%29 = load float, float* %12
%30 = fmul float %28, %29
%31 = load float, float* %11
%32 = call float @sinf(float %31)
%33 = fmul float %30, %32
%34 = fdiv float %33, 3.600000e+02
%35 = load float*, float** %10
store float %34, float* %35
ret void
}

LLVM IR (-O2):
@M_PI = global float 0.000000e+00
define void @_get_frame(float %0, float %1, float %2, float* nocapture writeonly %3, float* nocapture writeonly %4) {
%6 = load float, float* @M_PI
%7 = fmul float %6, 2.000000e+00
%8 = fsub float 9.000000e+01, %0
%9 = fmul float %8, %7
%10 = fdiv float %9, 3.600000e+02
%11 = fadd float %2, 0x41584DB040000000
%12 = fmul float %11, %7
%13 = fdiv float %12, 3.600000e+02
store float %13, float* %3
%14 = load float, float* @M_PI
%15 = fmul float %14, 2.000000e+00
%16 = fmul float %11, %15
%17 = tail call float @sinf(float %10)
%18 = fmul float %17, %16
%19 = fdiv float %18, 3.600000e+02
store float %19, float* %4
ret void
}