#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*/ binlensd1(double, double, double, double, double *, double *,
                             double *);
int /*<<< orphan*/ normal(double, double, double, double, double *, double *);
void tangent_y(double x1, double x2, double d, double m1, double *ty1,
               double *ty2) {
  double n1, n2;
  double y11, y12, y22;
  normal(x1, x2, d, m1, &n1, &n2);
  binlensd1(x1, x2, d, m1, &y11, &y12, &y22);
  *ty1 = n1 * y12 - n2 * y11;
  *ty2 = n1 * y22 - n2 * y12;
}


x86 assembly (clang, -O0):
<tangent_y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
lea    -0x38(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <normal@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
lea    -0x48(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x58(%rbp),%rdx
call   1040 <binlensd1@plt>
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tangent_y>:
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,(%rsp)
lea    0x40(%rsp),%rdi
lea    0x38(%rsp),%rsi
call   1030 <normal@plt>
lea    0x30(%rsp),%rdi
lea    0x28(%rsp),%rsi
lea    0x20(%rsp),%rdx
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
movsd  0x18(%rsp),%xmm3
call   1040 <binlensd1@plt>
movsd  0x40(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x38(%rsp),%xmm2
movsd  0x30(%rsp),%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm0,%xmm4
mulsd  %xmm1,%xmm4
subsd  %xmm3,%xmm4
movsd  %xmm4,(%rbx)
mulsd  %xmm2,%xmm1
mulsd  0x20(%rsp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @tangent_y(double %0, double %1, double %2, double %3, double* %4, double* %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double*
%12 = alloca double*
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double* %4, double** %11
store double* %5, double** %12
%18 = load double, double* %7
%19 = load double, double* %8
%20 = load double, double* %9
%21 = load double, double* %10
%22 = call i32 @normal(double %18, double %19, double %20, double %21, double* %13, double* %14)
%23 = load double, double* %7
%24 = load double, double* %8
%25 = load double, double* %9
%26 = load double, double* %10
%27 = call i32 @binlensd1(double %23, double %24, double %25, double %26, double* %15, double* %16, double* %17)
%28 = load double, double* %13
%29 = load double, double* %16
%30 = load double, double* %14
%31 = load double, double* %15
%32 = fmul double %30, %31
%33 = fneg double %32
%34 = call double @llvm.fmuladd.f64(double %28, double %29, double %33)
%35 = load double*, double** %11
store double %34, double* %35
%36 = load double, double* %13
%37 = load double, double* %17
%38 = load double, double* %14
%39 = load double, double* %16
%40 = fmul double %38, %39
%41 = fneg double %40
%42 = call double @llvm.fmuladd.f64(double %36, double %37, double %41)
%43 = load double*, double** %12
store double %42, double* %43
ret void
}

LLVM IR (-O2):
define void @tangent_y(double %0, double %1, double %2, double %3, double* nocapture writeonly %4, double* nocapture writeonly %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = bitcast double* %7 to i8*
%13 = bitcast double* %8 to i8*
%14 = bitcast double* %9 to i8*
%15 = bitcast double* %10 to i8*
%16 = bitcast double* %11 to i8*
%17 = call i32 @normal(double %0, double %1, double %2, double %3, double* %7, double* %8)
%18 = call i32 @binlensd1(double %0, double %1, double %2, double %3, double* %9, double* %10, double* %11)
%19 = load double, double* %7
%20 = load double, double* %10
%21 = load double, double* %8
%22 = load double, double* %9
%23 = fneg double %21
%24 = fmul double %22, %23
%25 = call double @llvm.fmuladd.f64(double %19, double %20, double %24)
store double %25, double* %4
%26 = load double, double* %11
%27 = fmul double %20, %23
%28 = call double @llvm.fmuladd.f64(double %19, double %26, double %27)
store double %28, double* %5
ret void
}