#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*/ cpd_to_pixel(int, int, double, double, double);
double pixel_to_wDistance(int, double, double, int /*<<< orphan*/);
double cpd_to_wDistance(int screen_resX, int screen_resY, double screen_size,
                        double user_distance, int camera_vportY,
                        double camera_fov, double camera_distance, double cpd) {
  return pixel_to_wDistance(
      camera_vportY, camera_fov, camera_distance,
      cpd_to_pixel(screen_resX, screen_resY, screen_size, user_distance, cpd));
}


x86 assembly (clang, -O0):
<cpd_to_wDistance>:
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    -0x1c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
call   1040 <cpd_to_pixel@plt>
mov    -0x4c(%rbp),%edi
movsd  -0x48(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mov    %eax,%esi
call   1030 <pixel_to_wDistance@plt>
add    $0x50,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @cpd_to_wDistance(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* %13
%18 = load double, double* %14
%19 = load double, double* %15
%20 = load i32, i32* %9
%21 = load i32, i32* %10
%22 = load double, double* %11
%23 = load double, double* %12
%24 = load double, double* %16
%25 = call i32 @cpd_to_pixel(i32 %20, i32 %21, double %22, double %23, double %24)
%26 = call double @pixel_to_wDistance(i32 %17, double %18, double %19, i32 %25)
ret double %26
}

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