#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 */
float INFINITY;
float logf(scalar_t__);
scalar_t__ sqrtf(float);
float asinhf(float x) {
  if (x == -INFINITY) {
    return -INFINITY;
  }
  return logf(x + sqrtf(x * x + 1));
}


x86 assembly (clang, -O0):
<asinhf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
mov    0x2eaf(%rip),%rax
movss  (%rax),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
ucomiss %xmm1,%xmm0
jne    117b <asinhf+0x5b>
jp     117b <asinhf+0x5b>
mov    0x2e88(%rip),%rax
movss  (%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11c1 <asinhf+0xa1>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xe65(%rip),%xmm1
addss  %xmm1,%xmm0
call   1040 <sqrtf@plt>
movss  -0xc(%rbp),%xmm0
cvtsi2ss %rax,%xmm1
addss  %xmm1,%xmm0
cvttss2si %xmm0,%rdi
call   1030 <logf@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<asinhf>:
push   %rax
movaps %xmm0,%xmm1
mov    0x2ebd(%rip),%rax
movss  (%rax),%xmm0
xorps  0xeca(%rip),%xmm0
ucomiss %xmm1,%xmm0
jne    113f <asinhf+0x1f>
jp     113f <asinhf+0x1f>
pop    %rax
ret
movaps %xmm1,%xmm0
mulss  %xmm1,%xmm0
addss  0xec2(%rip),%xmm0
movss  %xmm1,0x4(%rsp)
call   1040 <sqrtf@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
addss  0x4(%rsp),%xmm0
cvttss2si %xmm0,%rdi
pop    %rax
jmp    1030 <logf@plt>

LLVM IR (-O0):
@INFINITY = global float 0.000000e+00
define float @asinhf(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = load float, float* @INFINITY
%6 = fneg float %5
%7 = fcmp oeq float %4, %6
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load float, float* @INFINITY
%10 = fneg float %9
store float %10, float* %2
br label %21
11: ; preds = %1
%12 = load float, float* %3
%13 = load float, float* %3
%14 = load float, float* %3
%15 = call float @llvm.fmuladd.f32(float %13, float %14, float 1.000000e+00)
%16 = call i64 @sqrtf(float %15)
%17 = sitofp i64 %16 to float
%18 = fadd float %12, %17
%19 = fptosi float %18 to i64
%20 = call float @logf(i64 %19)
store float %20, float* %2
br label %21
21: ; preds = %11, %8
%22 = load float, float* %2
ret float %22
}

LLVM IR (-O2):
@INFINITY = global float 0.000000e+00
define float @asinhf(float %0) {
%2 = load float, float* @INFINITY
%3 = fneg float %2
%4 = fcmp oeq float %3, %0
br i1 %4, label %12, label %5
5: ; preds = %1
%6 = tail call float @llvm.fmuladd.f32(float %0, float %0, float 1.000000e+00)
%7 = tail call i64 @sqrtf(float %6)
%8 = sitofp i64 %7 to float
%9 = fadd float %8, %0
%10 = fptosi float %9 to i64
%11 = tail call float @logf(i64 %10)
br label %12
12: ; preds = %1, %5
%13 = phi float [ %11, %5 ], [ %3, %1 ]
ret float %13
}