#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 tanh(double);
double deriv_atanh_th_th(double x, double y, double z) {
  double thx, thy, thxy;
  thx = tanh(x);
  thy = tanh(y);
  thxy = thx * thy;
  return (thx * (1 - thy * thy) / (1 - thxy * thxy)) * (1 + z);
}


x86 assembly (clang, -O0):
<deriv_atanh_th_th>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <tanh@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <tanh@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe7a(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe45(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  0xe35(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deriv_atanh_th_th>:
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1030 <tanh@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <tanh@plt>
movsd  (%rsp),%xmm4
movapd %xmm4,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm0
movsd  0xeb2(%rip),%xmm3
movapd %xmm3,%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm4,%xmm1
mulsd  %xmm2,%xmm2
movsd  0x10(%rsp),%xmm0
addsd  %xmm3,%xmm0
subsd  %xmm2,%xmm3
divsd  %xmm3,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @deriv_atanh_th_th(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%10 = load double, double* %4
%11 = call double @tanh(double %10)
store double %11, double* %7
%12 = load double, double* %5
%13 = call double @tanh(double %12)
store double %13, double* %8
%14 = load double, double* %7
%15 = load double, double* %8
%16 = fmul double %14, %15
store double %16, double* %9
%17 = load double, double* %7
%18 = load double, double* %8
%19 = load double, double* %8
%20 = fneg double %18
%21 = call double @llvm.fmuladd.f64(double %20, double %19, double 1.000000e+00)
%22 = fmul double %17, %21
%23 = load double, double* %9
%24 = load double, double* %9
%25 = fneg double %23
%26 = call double @llvm.fmuladd.f64(double %25, double %24, double 1.000000e+00)
%27 = fdiv double %22, %26
%28 = load double, double* %6
%29 = fadd double 1.000000e+00, %28
%30 = fmul double %27, %29
ret double %30
}

LLVM IR (-O2):
define double @deriv_atanh_th_th(double %0, double %1, double %2) {
%4 = tail call double @tanh(double %0)
%5 = tail call double @tanh(double %1)
%6 = fmul double %4, %5
%7 = fneg double %5
%8 = tail call double @llvm.fmuladd.f64(double %7, double %5, double 1.000000e+00)
%9 = fmul double %4, %8
%10 = fneg double %6
%11 = tail call double @llvm.fmuladd.f64(double %10, double %6, double 1.000000e+00)
%12 = fdiv double %9, %11
%13 = fadd double %2, 1.000000e+00
%14 = fmul double %13, %12
ret double %14
}