void wcssize(wcs, cra, cdec, dra, ddec) struct WorldCoor *wcs;
double *cra;
double *cdec;
double *dra;
double *ddec;
{
  double width, height;
  if (iswcs(wcs)) {
    wcsfull(wcs, cra, cdec, &width, &height);
    *dra = 0.5 * width / cos(degrad(*cdec));
    *ddec = 0.5 * height;
  } else {
    *cra = 0.0;
    *cdec = 0.0;
    *dra = 0.0;
    *ddec = 0.0;
  }
  return;
}


x86 assembly (clang, -O0):
<wcssize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <iswcs@plt>
cmp    $0x0,%eax
je     11e3 <wcssize+0xa3>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x30(%rbp),%rcx
lea    -0x38(%rbp),%r8
mov    $0x0,%al
call   1040 <wcsfull@plt>
movsd  0xe6d(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x1,%al
call   1050 <degrad@plt>
cvtsi2sd %eax,%xmm0
call   1060 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xe2f(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    120f <wcssize+0xcf>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcssize>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r13
mov    %rsi,%r12
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <iswcs@plt>
test   %eax,%eax
je     11cd <wcssize+0x8d>
lea    0x18(%rsp),%rcx
lea    0x10(%rsp),%r8
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1040 <wcsfull@plt>
movsd  0x18(%rsp),%xmm0
mulsd  0xe71(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x0(%r13),%xmm0
mov    $0x1,%al
call   1050 <degrad@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
call   1060 <cos@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0xe40(%rip),%xmm0
movsd  %xmm1,(%r15)
mulsd  0x10(%rsp),%xmm0
jmp    11e8 <wcssize+0xa8>
movq   $0x0,(%r12)
movq   $0x0,0x0(%r13)
movq   $0x0,(%r15)
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%r14)
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.WorldCoor = type opaque
define void @wcssize(%struct.WorldCoor* %0, double* %1, double* %2, double* %3, double* %4) {
%6 = alloca %struct.WorldCoor*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double
%12 = alloca double
store %struct.WorldCoor* %0, %struct.WorldCoor** %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
store double* %4, double** %10
%13 = load %struct.WorldCoor*, %struct.WorldCoor** %6
%14 = call i32 (%struct.WorldCoor*, ...) bitcast (i32 (...)* @iswcs to i32 (%struct.WorldCoor*, ...)*)(%struct.WorldCoor* %13)
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %33
16: ; preds = %5
%17 = load %struct.WorldCoor*, %struct.WorldCoor** %6
%18 = load double*, double** %7
%19 = load double*, double** %8
%20 = call i32 (%struct.WorldCoor*, double*, double*, double*, double*, ...) bitcast (i32 (...)* @wcsfull to i32 (%struct.WorldCoor*, double*, double*, double*, double*, ...)*)(%struct.WorldCoor* %17, double* %18, double* %19, double* %11, double* %12)
%21 = load double, double* %11
%22 = fmul double 5.000000e-01, %21
%23 = load double*, double** %8
%24 = load double, double* %23
%25 = call i32 (double, ...) bitcast (i32 (...)* @degrad to i32 (double, ...)*)(double %24)
%26 = sitofp i32 %25 to double
%27 = call double @cos(double %26)
%28 = fdiv double %22, %27
%29 = load double*, double** %9
store double %28, double* %29
%30 = load double, double* %12
%31 = fmul double 5.000000e-01, %30
%32 = load double*, double** %10
store double %31, double* %32
br label %38
33: ; preds = %5
%34 = load double*, double** %7
store double 0.000000e+00, double* %34
%35 = load double*, double** %8
store double 0.000000e+00, double* %35
%36 = load double*, double** %9
store double 0.000000e+00, double* %36
%37 = load double*, double** %10
store double 0.000000e+00, double* %37
br label %38
38: ; preds = %33, %16
ret void
}

LLVM IR (-O2):
%struct.WorldCoor = type opaque
define void @wcssize(%struct.WorldCoor* %0, double* %1, double* %2, double* nocapture writeonly %3, double* nocapture writeonly %4) {
%6 = alloca double
%7 = alloca double
%8 = bitcast double* %6 to i8*
%9 = bitcast double* %7 to i8*
%10 = tail call i32 (%struct.WorldCoor*, ...) bitcast (i32 (...)* @iswcs to i32 (%struct.WorldCoor*, ...)*)(%struct.WorldCoor* %0)
%11 = icmp eq i32 %10, 0
br i1 %11, label %23, label %12
12: ; preds = %5
%13 = call i32 (%struct.WorldCoor*, double*, double*, double*, double*, ...) bitcast (i32 (...)* @wcsfull to i32 (%struct.WorldCoor*, double*, double*, double*, double*, ...)*)(%struct.WorldCoor* %0, double* %1, double* %2, double* %6, double* %7)
%14 = load double, double* %6
%15 = fmul double %14, 5.000000e-01
%16 = load double, double* %2
%17 = call i32 (double, ...) bitcast (i32 (...)* @degrad to i32 (double, ...)*)(double %16)
%18 = sitofp i32 %17 to double
%19 = call double @cos(double %18)
%20 = fdiv double %15, %19
store double %20, double* %3
%21 = load double, double* %7
%22 = fmul double %21, 5.000000e-01
br label %24
23: ; preds = %5
store double 0.000000e+00, double* %1
store double 0.000000e+00, double* %2
store double 0.000000e+00, double* %3
br label %24
24: ; preds = %23, %12
%25 = phi double [ 0.000000e+00, %23 ], [ %22, %12 ]
store double %25, double* %4
ret void
}