#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 M_PI;
int /*<<< orphan*/ rotate(double, double, double, double *, double *);
void hpl2pixel(double tx, double ty, double crota2, double crpix1,
               double crpix2, double cdelt1, double cdelt2, double *x,
               double *y) {
  double x0, y0;
  double trad;
  double nx, ny;
  double xx, yy;
  trad = M_PI / 180.0 * crota2;
  x0 = crpix1 - 1;
  y0 = crpix2 - 1;
  nx = tx / cdelt1;
  ny = ty / cdelt2;
  rotate(nx, ny, -1.0 * trad, &xx, &yy);
  *x = xx + x0;
  *y = yy + y0;
  return;
}


x86 assembly (clang, -O0):
<hpl2pixel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
mov    %rdi,-0x40(%rbp)
mov    %rsi,-0x48(%rbp)
mov    0x2e9b(%rip),%rax
movsd  (%rax),%xmm0
movsd  0xeb7(%rip),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe94(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe7e(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  0xe3d(%rip),%xmm2
mulsd  -0x60(%rbp),%xmm2
lea    -0x78(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1030 <rotate@plt>
movsd  -0x78(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hpl2pixel>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x2ec4(%rip),%rax
movsd  (%rax),%xmm7
movsd  0xecf(%rip),%xmm8
addsd  %xmm8,%xmm3
movsd  %xmm3,0x8(%rsp)
addsd  %xmm8,%xmm4
movsd  %xmm4,0x10(%rsp)
divsd  %xmm5,%xmm0
divsd  %xmm6,%xmm1
divsd  0xeb1(%rip),%xmm7
mulsd  %xmm7,%xmm2
lea    0x20(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1030 <rotate@plt>
movsd  0x8(%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x10(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define void @hpl2pixel(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double* %7, double* %8) {
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double*
%18 = alloca double*
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
store double %0, double* %10
store double %1, double* %11
store double %2, double* %12
store double %3, double* %13
store double %4, double* %14
store double %5, double* %15
store double %6, double* %16
store double* %7, double** %17
store double* %8, double** %18
%26 = load double, double* @M_PI
%27 = fdiv double %26, 1.800000e+02
%28 = load double, double* %12
%29 = fmul double %27, %28
store double %29, double* %21
%30 = load double, double* %13
%31 = fsub double %30, 1.000000e+00
store double %31, double* %19
%32 = load double, double* %14
%33 = fsub double %32, 1.000000e+00
store double %33, double* %20
%34 = load double, double* %10
%35 = load double, double* %15
%36 = fdiv double %34, %35
store double %36, double* %22
%37 = load double, double* %11
%38 = load double, double* %16
%39 = fdiv double %37, %38
store double %39, double* %23
%40 = load double, double* %22
%41 = load double, double* %23
%42 = load double, double* %21
%43 = fmul double -1.000000e+00, %42
%44 = call i32 @rotate(double %40, double %41, double %43, double* %24, double* %25)
%45 = load double, double* %24
%46 = load double, double* %19
%47 = fadd double %45, %46
%48 = load double*, double** %17
store double %47, double* %48
%49 = load double, double* %25
%50 = load double, double* %20
%51 = fadd double %49, %50
%52 = load double*, double** %18
store double %51, double* %52
ret void
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define void @hpl2pixel(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double* nocapture writeonly %7, double* nocapture writeonly %8) {
%10 = alloca double
%11 = alloca double
%12 = bitcast double* %10 to i8*
%13 = bitcast double* %11 to i8*
%14 = load double, double* @M_PI
%15 = fadd double %3, -1.000000e+00
%16 = fadd double %4, -1.000000e+00
%17 = fdiv double %0, %5
%18 = fdiv double %1, %6
%19 = fdiv double %14, -1.800000e+02
%20 = fmul double %19, %2
%21 = call i32 @rotate(double %17, double %18, double %20, double* %10, double* %11)
%22 = load double, double* %10
%23 = fadd double %15, %22
store double %23, double* %7
%24 = load double, double* %11
%25 = fadd double %16, %24
store double %25, double* %8
ret void
}