#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 __builtin_inf();
double ldexp2k(double, int);
double mla(double, double, double);
scalar_t__ rintk(double);
__attribute__((visibility("default"))) const double xexp10_u35(double d) {
  int q = (int)rintk(d * 3.3219280948873623478703194294893901758648313930);
  double s, u;
  s = mla(q, -0.30102999566383914498, d);
  s = mla(q, -1.4205023227266099418e-13, s);
  u = +0.2411463498334267652e-3;
  u = mla(u, s, +0.1157488415217187375e-2);
  u = mla(u, s, +0.5013975546789733659e-2);
  u = mla(u, s, +0.1959762320720533080e-1);
  u = mla(u, s, +0.6808936399446784138e-1);
  u = mla(u, s, +0.2069958494722676234e+0);
  u = mla(u, s, +0.5393829292058536229e+0);
  u = mla(u, s, +0.1171255148908541655e+1);
  u = mla(u, s, +0.2034678592293432953e+1);
  u = mla(u, s, +0.2650949055239205876e+1);
  u = mla(u, s, +0.2302585092994045901e+1);
  u = mla(u, s, +0.1000000000000000000e+1);
  u = ldexp2k(u, q);
  if (d > 308.25471555991671)
    u = __builtin_inf();
  if (d < -350)
    u = 0;
  return u;
}


x86 assembly (clang, -O0):
<xexp10_u35>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xf33(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <rintk@plt>
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xf0c(%rip),%xmm1
call   1050 <mla@plt>
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xee8(%rip),%xmm1
call   1050 <mla@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xece(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xeaf(%rip),%xmm2
call   1050 <mla@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xe8b(%rip),%xmm2
call   1050 <mla@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xe67(%rip),%xmm2
call   1050 <mla@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xe43(%rip),%xmm2
call   1050 <mla@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xe1f(%rip),%xmm2
call   1050 <mla@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xdfb(%rip),%xmm2
call   1050 <mla@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xdd7(%rip),%xmm2
call   1050 <mla@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xdb3(%rip),%xmm2
call   1050 <mla@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xd8f(%rip),%xmm2
call   1050 <mla@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xd6b(%rip),%xmm2
call   1050 <mla@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xd47(%rip),%xmm2
call   1050 <mla@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1040 <ldexp2k@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xd16(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1301 <xexp10_u35+0x1d1>
movsd  0xd84(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xd7f(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    131c <xexp10_u35+0x1ec>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xexp10_u35>:
push   %rbx
sub    $0x20,%rsp
movapd %xmm0,%xmm1
movapd %xmm0,0x10(%rsp)
movsd  0xeb9(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <rintk@plt>
mov    %rax,%rbx
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xea0(%rip),%xmm1
movaps 0x10(%rsp),%xmm2
call   1050 <mla@plt>
movapd %xmm0,%xmm2
movsd  0xe92(%rip),%xmm1
movsd  0x8(%rsp),%xmm0
call   1050 <mla@plt>
movaps %xmm0,%xmm1
movsd  %xmm0,0x8(%rsp)
movsd  0xe7e(%rip),%xmm0
movsd  0xe7e(%rip),%xmm2
call   1050 <mla@plt>
movsd  0xe79(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
call   1050 <mla@plt>
movsd  0xe6e(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
call   1050 <mla@plt>
movsd  0xe63(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
call   1050 <mla@plt>
movsd  0xe58(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
call   1050 <mla@plt>
movsd  0xe4d(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
call   1050 <mla@plt>
movsd  0xe42(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
call   1050 <mla@plt>
movsd  0xe37(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
call   1050 <mla@plt>
movsd  0xe2c(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
call   1050 <mla@plt>
movsd  0xe21(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
call   1050 <mla@plt>
movsd  0xe16(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
call   1050 <mla@plt>
mov    %ebx,%edi
call   1040 <ldexp2k@plt>
movsd  0xe04(%rip),%xmm1
movapd 0x10(%rsp),%xmm3
cmpltsd %xmm3,%xmm1
movsd  0xdf9(%rip),%xmm2
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm1,%xmm2
movapd %xmm3,%xmm0
cmpltsd 0xde8(%rip),%xmm0
andnpd %xmm2,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @xexp10_u35(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
%7 = fmul double %6, 0x400A934F0979A371
%8 = call i64 @rintk(double %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = sitofp i32 %10 to double
%12 = load double, double* %2
%13 = call double @mla(double %11, double 0xBFD34413509F7000, double %12)
store double %13, double* %4
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to double
%16 = load double, double* %4
%17 = call double @mla(double %15, double 0xBD43FDE623E2566B, double %16)
store double %17, double* %4
store double 0x3F2F9B875F46726F, double* %5
%18 = load double, double* %5
%19 = load double, double* %4
%20 = call double @mla(double %18, double %19, double 0x3F52F6DBB8E3072A)
store double %20, double* %5
%21 = load double, double* %5
%22 = load double, double* %4
%23 = call double @mla(double %21, double %22, double 0x3F748988CFF14706)
store double %23, double* %5
%24 = load double, double* %5
%25 = load double, double* %4
%26 = call double @mla(double %24, double %25, double 0x3F9411663B046154)
store double %26, double* %5
%27 = load double, double* %5
%28 = load double, double* %4
%29 = call double @mla(double %27, double %28, double 0x3FB16E4DF78FCA37)
store double %29, double* %5
%30 = load double, double* %5
%31 = load double, double* %4
%32 = call double @mla(double %30, double %31, double 0x3FCA7ED709F2107E)
store double %32, double* %5
%33 = load double, double* %5
%34 = load double, double* %4
%35 = call double @mla(double %33, double %34, double 0x3FE1429FFD1EB6E2)
store double %35, double* %5
%36 = load double, double* %5
%37 = load double, double* %4
%38 = call double @mla(double %36, double %37, double 0x3FF2BD7609FD573B)
store double %38, double* %5
%39 = load double, double* %5
%40 = load double, double* %4
%41 = call double @mla(double %39, double %40, double 0x4000470591DE2C43)
store double %41, double* %5
%42 = load double, double* %5
%43 = load double, double* %4
%44 = call double @mla(double %42, double %43, double 0x40053524C73CEA78)
store double %44, double* %5
%45 = load double, double* %5
%46 = load double, double* %4
%47 = call double @mla(double %45, double %46, double 0x40026BB1BBB55516)
store double %47, double* %5
%48 = load double, double* %5
%49 = load double, double* %4
%50 = call double @mla(double %48, double %49, double 1.000000e+00)
store double %50, double* %5
%51 = load double, double* %5
%52 = load i32, i32* %3
%53 = call double @ldexp2k(double %51, i32 %52)
store double %53, double* %5
%54 = load double, double* %2
%55 = fcmp ogt double %54, 0x40734413509F79FE
br i1 %55, label %56, label %57
56: ; preds = %1
store double 0x7FF0000000000000, double* %5
br label %57
57: ; preds = %56, %1
%58 = load double, double* %2
%59 = fcmp olt double %58, -3.500000e+02
br i1 %59, label %60, label %61
60: ; preds = %57
store double 0.000000e+00, double* %5
br label %61
61: ; preds = %60, %57
%62 = load double, double* %5
ret double %62
}

LLVM IR (-O2):
define double @xexp10_u35(double %0) {
%2 = fmul double %0, 0x400A934F0979A371
%3 = tail call i64 @rintk(double %2)
%4 = trunc i64 %3 to i32
%5 = sitofp i32 %4 to double
%6 = tail call double @mla(double %5, double 0xBFD34413509F7000, double %0)
%7 = tail call double @mla(double %5, double 0xBD43FDE623E2566B, double %6)
%8 = tail call double @mla(double 0x3F2F9B875F46726F, double %7, double 0x3F52F6DBB8E3072A)
%9 = tail call double @mla(double %8, double %7, double 0x3F748988CFF14706)
%10 = tail call double @mla(double %9, double %7, double 0x3F9411663B046154)
%11 = tail call double @mla(double %10, double %7, double 0x3FB16E4DF78FCA37)
%12 = tail call double @mla(double %11, double %7, double 0x3FCA7ED709F2107E)
%13 = tail call double @mla(double %12, double %7, double 0x3FE1429FFD1EB6E2)
%14 = tail call double @mla(double %13, double %7, double 0x3FF2BD7609FD573B)
%15 = tail call double @mla(double %14, double %7, double 0x4000470591DE2C43)
%16 = tail call double @mla(double %15, double %7, double 0x40053524C73CEA78)
%17 = tail call double @mla(double %16, double %7, double 0x40026BB1BBB55516)
%18 = tail call double @mla(double %17, double %7, double 1.000000e+00)
%19 = tail call double @ldexp2k(double %18, i32 %4)
%20 = fcmp ogt double %0, 0x40734413509F79FE
%21 = select i1 %20, double 0x7FF0000000000000, double %19
%22 = fcmp olt double %0, -3.500000e+02
%23 = select i1 %22, double 0.000000e+00, double %21
ret double %23
}