#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 pixel_to_cpd(int, int, double, double, int /*<<< orphan*/);
int /*<<< orphan*/ wDistance_to_pixel(int, double, double, double);
double wDistance_to_cpd(int screen_resX, int screen_resY, double screen_size,
                        double user_distance, int camera_vportY,
                        double camera_fov, double camera_distance,
                        double wDistance) {
  return pixel_to_cpd(screen_resX, screen_resY, screen_size, user_distance,
                      wDistance_to_pixel(camera_vportY, camera_fov,
                                         camera_distance, wDistance));
}


x86 assembly (clang, -O0):
<wDistance_to_cpd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4c(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x1c(%rbp),%edi
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
call   1030 <wDistance_to_pixel@plt>
mov    -0x50(%rbp),%edi
mov    -0x4c(%rbp),%esi
movsd  -0x48(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mov    %eax,%edx
call   1040 <pixel_to_cpd@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wDistance_to_cpd>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edx,%edi
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
movaps %xmm4,%xmm2
call   1030 <wDistance_to_pixel@plt>
mov    %ebp,%edi
mov    %ebx,%esi
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mov    %eax,%edx
add    $0x18,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <pixel_to_cpd@plt>

LLVM IR (-O0):
define double @wDistance_to_cpd(i32 %0, i32 %1, double %2, double %3, i32 %4, double %5, double %6, double %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca i32
%14 = alloca double
%15 = alloca double
%16 = alloca double
store i32 %0, i32* %9
store i32 %1, i32* %10
store double %2, double* %11
store double %3, double* %12
store i32 %4, i32* %13
store double %5, double* %14
store double %6, double* %15
store double %7, double* %16
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = load double, double* %11
%20 = load double, double* %12
%21 = load i32, i32* %13
%22 = load double, double* %14
%23 = load double, double* %15
%24 = load double, double* %16
%25 = call i32 @wDistance_to_pixel(i32 %21, double %22, double %23, double %24)
%26 = call double @pixel_to_cpd(i32 %17, i32 %18, double %19, double %20, i32 %25)
ret double %26
}

LLVM IR (-O2):
define double @wDistance_to_cpd(i32 %0, i32 %1, double %2, double %3, i32 %4, double %5, double %6, double %7) {
%9 = tail call i32 @wDistance_to_pixel(i32 %4, double %5, double %6, double %7)
%10 = tail call double @pixel_to_cpd(i32 %0, i32 %1, double %2, double %3, i32 %9)
ret double %10
}