#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 expf(float);
float sinhf(float arg) {
  float temp, argsq;
  register int sign;
  sign = 1;
  if (arg < 0) {
    arg = -arg;
    sign = -1;
  }
  if (arg > 21.) {
    temp = expf(arg) / 2;
    if (sign > 0)
      return (temp);
    else
      return (-temp);
  }
  if (arg > 0.5) {
    return (sign * (expf(arg) - expf(-arg)) / 2);
  }
  argsq = arg * arg;
  temp = (((-0.263056321339750e+2 * argsq + -0.289421135598956e+4) * argsq +
           -0.899127202203951e+5) *
              argsq +
          -0.630767364049772e+6) *
         arg;
  temp /= (((argsq + -0.173678953558234e+3) * argsq + 0.152151737879002e+5) *
               argsq +
           -0.630767364049772e+6);
  return (sign * temp);
}


x86 assembly (clang, -O0):
<sinhf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    114f <sinhf+0x3f>
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11ba <sinhf+0xaa>
movss  -0x8(%rbp),%xmm0
call   1030 <expf@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    119e <sinhf+0x8e>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1306 <sinhf+0x1f6>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1306 <sinhf+0x1f6>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe3d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1222 <sinhf+0x112>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <expf@plt>
mov    %eax,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <expf@plt>
mov    -0x1c(%rbp),%ecx
mov    %eax,%edx
mov    -0x18(%rbp),%eax
sub    %edx,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1306 <sinhf+0x1f6>
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdee(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdea(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdc1(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x10(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd90(%rip),%xmm1
addsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd75(%rip),%xmm0
addsd  %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd54(%rip),%xmm0
addsd  %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd33(%rip),%xmm0
addsd  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
cvtsi2ssl -0x14(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinhf>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movaps %xmm0,%xmm2
xorps  %xmm3,%xmm3
xor    %eax,%eax
ucomiss %xmm0,%xmm3
setbe  %cl
movaps 0xed5(%rip),%xmm1
xorps  %xmm0,%xmm1
cmpltss %xmm3,%xmm0
andps  %xmm0,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
ucomiss 0xecd(%rip),%xmm0
jbe    1177 <sinhf+0x67>
movaps %xmm2,(%rsp)
call   1030 <expf@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
xorps  %xmm0,%xmm0
ucomiss (%rsp),%xmm0
xorps  %xmm0,%xmm0
cvtsi2ss %ecx,%xmm0
jbe    1241 <sinhf+0x131>
xorps  0xe8e(%rip),%xmm0
jmp    1241 <sinhf+0x131>
mov    %cl,%al
lea    (%rax,%rax,1),%ebp
add    $0xffffffff,%ebp
ucomiss 0xe8e(%rip),%xmm0
jbe    11bd <sinhf+0xad>
movaps %xmm0,(%rsp)
call   1030 <expf@plt>
mov    %eax,%ebx
movaps 0xe66(%rip),%xmm0
xorps  (%rsp),%xmm0
call   1030 <expf@plt>
sub    %eax,%ebx
imul   %ebp,%ebx
mov    %ebx,%eax
shr    $0x1f,%eax
add    %ebx,%eax
sar    %eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
jmp    1241 <sinhf+0x131>
cvtss2sd %xmm0,%xmm4
mulss  %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movsd  0xe4c(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xe48(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  0xe44(%rip),%xmm2
mulsd  %xmm1,%xmm2
movsd  0xe40(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm4,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
movsd  0xe31(%rip),%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
addsd  0xe29(%rip),%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm3,%xmm2
cvtss2sd %xmm0,%xmm0
divsd  %xmm2,%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
mulss  %xmm1,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define float @sinhf(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca i32
store float %0, float* %3
store i32 1, i32* %6
%7 = load float, float* %3
%8 = fcmp olt float %7, 0.000000e+00
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load float, float* %3
%11 = fneg float %10
store float %11, float* %3
store i32 -1, i32* %6
br label %12
12: ; preds = %9, %1
%13 = load float, float* %3
%14 = fpext float %13 to double
%15 = fcmp ogt double %14, 2.100000e+01
br i1 %15, label %16, label %28
16: ; preds = %12
%17 = load float, float* %3
%18 = call i32 @expf(float %17)
%19 = sdiv i32 %18, 2
%20 = sitofp i32 %19 to float
store float %20, float* %4
%21 = load i32, i32* %6
%22 = icmp sgt i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %16
%24 = load float, float* %4
store float %24, float* %2
br label %77
25: ; preds = %16
%26 = load float, float* %4
%27 = fneg float %26
store float %27, float* %2
br label %77
28: ; preds = %12
%29 = load float, float* %3
%30 = fpext float %29 to double
%31 = fcmp ogt double %30, 5.000000e-01
br i1 %31, label %32, label %43
32: ; preds = %28
%33 = load i32, i32* %6
%34 = load float, float* %3
%35 = call i32 @expf(float %34)
%36 = load float, float* %3
%37 = fneg float %36
%38 = call i32 @expf(float %37)
%39 = sub nsw i32 %35, %38
%40 = mul nsw i32 %33, %39
%41 = sdiv i32 %40, 2
%42 = sitofp i32 %41 to float
store float %42, float* %2
br label %77
43: ; preds = %28
%44 = load float, float* %3
%45 = load float, float* %3
%46 = fmul float %44, %45
store float %46, float* %5
%47 = load float, float* %5
%48 = fpext float %47 to double
%49 = call double @llvm.fmuladd.f64(double 0xC03A4E3DE8540781, double %48, double 0xC0A69C6C36DA2DF3)
%50 = load float, float* %5
%51 = fpext float %50 to double
%52 = call double @llvm.fmuladd.f64(double %49, double %51, double 0xC0F5F38B8605D22E)
%53 = load float, float* %5
%54 = fpext float %53 to double
%55 = call double @llvm.fmuladd.f64(double %52, double %54, double 0xC1233FDEBA64BB52)
%56 = load float, float* %3
%57 = fpext float %56 to double
%58 = fmul double %55, %57
%59 = fptrunc double %58 to float
store float %59, float* %4
%60 = load float, float* %5
%61 = fpext float %60 to double
%62 = fadd double %61, 0xC065B5B9FCD003C6
%63 = load float, float* %5
%64 = fpext float %63 to double
%65 = call double @llvm.fmuladd.f64(double %62, double %64, double 0x40CDB7963EAE91E6)
%66 = load float, float* %5
%67 = fpext float %66 to double
%68 = call double @llvm.fmuladd.f64(double %65, double %67, double 0xC1233FDEBA64BB52)
%69 = load float, float* %4
%70 = fpext float %69 to double
%71 = fdiv double %70, %68
%72 = fptrunc double %71 to float
store float %72, float* %4
%73 = load i32, i32* %6
%74 = sitofp i32 %73 to float
%75 = load float, float* %4
%76 = fmul float %74, %75
store float %76, float* %2
br label %77
77: ; preds = %43, %32, %25, %23
%78 = load float, float* %2
ret float %78
}

LLVM IR (-O2):
define float @sinhf(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
%5 = select i1 %2, i32 -1, i32 1
%6 = fpext float %4 to double
%7 = fcmp ogt float %4, 2.100000e+01
br i1 %7, label %8, label %14
8: ; preds = %1
%9 = tail call i32 @expf(float %4)
%10 = sdiv i32 %9, 2
%11 = sitofp i32 %10 to float
br i1 %2, label %12, label %40
12: ; preds = %8
%13 = fneg float %11
br label %40
14: ; preds = %1
%15 = fcmp ogt float %4, 5.000000e-01
br i1 %15, label %16, label %24
16: ; preds = %14
%17 = tail call i32 @expf(float %4)
%18 = fneg float %4
%19 = tail call i32 @expf(float %18)
%20 = sub nsw i32 %17, %19
%21 = mul nsw i32 %20, %5
%22 = sdiv i32 %21, 2
%23 = sitofp i32 %22 to float
br label %40
24: ; preds = %14
%25 = fmul float %4, %4
%26 = fpext float %25 to double
%27 = tail call double @llvm.fmuladd.f64(double %26, double 0xC03A4E3DE8540781, double 0xC0A69C6C36DA2DF3)
%28 = tail call double @llvm.fmuladd.f64(double %27, double %26, double 0xC0F5F38B8605D22E)
%29 = tail call double @llvm.fmuladd.f64(double %28, double %26, double 0xC1233FDEBA64BB52)
%30 = fmul double %29, %6
%31 = fptrunc double %30 to float
%32 = fadd double %26, 0xC065B5B9FCD003C6
%33 = tail call double @llvm.fmuladd.f64(double %32, double %26, double 0x40CDB7963EAE91E6)
%34 = tail call double @llvm.fmuladd.f64(double %33, double %26, double 0xC1233FDEBA64BB52)
%35 = fpext float %31 to double
%36 = fdiv double %35, %34
%37 = fptrunc double %36 to float
%38 = sitofp i32 %5 to float
%39 = fmul float %38, %37
br label %40
40: ; preds = %8, %24, %16, %12
%41 = phi float [ %13, %12 ], [ %23, %16 ], [ %39, %24 ], [ %11, %8 ]
ret float %41
}