#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 */
long double exp2l(long double);
int fabsl(long double);
long double modfl(long double, long double *);
long double powl(double, long double);
long double exp10l(long double x) {
  static const long double p10[] = {
      1e-15, 1e-14, 1e-13, 1e-12, 1e-11, 1e-10, 1e-9, 1e-8, 1e-7, 1e-6, 1e-5,
      1e-4,  1e-3,  1e-2,  1e-1,  1,     1e1,   1e2,  1e3,  1e4,  1e5,  1e6,
      1e7,   1e8,   1e9,   1e10,  1e11,  1e12,  1e13, 1e14, 1e15};
  long double n, y = modfl(x, &n);
  if (fabsl(n) < 16) {
    if (!y)
      return p10[(int)n + 15];
    y = exp2l(3.32192809488736234787031942948939L * y);
    return y * p10[(int)n + 15];
  }
  return powl(10.0, x);
}


x86 assembly (clang, -O0):
<exp10l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    -0x30(%rbp),%rdi
call   1060 <modfl@plt>
fstpt  -0x40(%rbp)
fldt   -0x30(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <fabsl@plt>
cmp    $0x10,%eax
jge    1225 <exp10l+0xe5>
fldt   -0x40(%rbp)
fldz
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
jne    11ce <exp10l+0x8e>
jp     11ce <exp10l+0x8e>
jmp    1194 <exp10l+0x54>
fldt   -0x30(%rbp)
fnstcw -0x4a(%rbp)
movzwl -0x4a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x4c(%rbp)
fldcw  -0x4c(%rbp)
fistpl -0x44(%rbp)
fldcw  -0x4a(%rbp)
movslq -0x44(%rbp),%rax
shl    $0x4,%rax
lea    0xe61(%rip),%rcx
fldt   0xf0(%rax,%rcx,1)
fstpt  -0x10(%rbp)
jmp    123d <exp10l+0xfd>
fldt   -0x40(%rbp)
fldt   0xe39(%rip)
fmulp  %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1050 <exp2l@plt>
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
fldt   -0x30(%rbp)
fnstcw -0x4e(%rbp)
movzwl -0x4e(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x50(%rbp)
fldcw  -0x50(%rbp)
fistpl -0x48(%rbp)
fldcw  -0x4e(%rbp)
movslq -0x48(%rbp),%rax
shl    $0x4,%rax
lea    0xe0c(%rip),%rcx
fldt   0xf0(%rax,%rcx,1)
fmulp  %st,%st(1)
fstpt  -0x10(%rbp)
jmp    123d <exp10l+0xfd>
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
movsd  0xdcb(%rip),%xmm0
call   1040 <powl@plt>
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp10l>:
sub    $0x68,%rsp
fldt   0x70(%rsp)
fld    %st(0)
fstpt  0x44(%rsp)
fstpt  (%rsp)
lea    0x50(%rsp),%rdi
call   1060 <modfl@plt>
fstpt  0x38(%rsp)
fldt   0x50(%rsp)
fld    %st(0)
fstpt  0x2c(%rsp)
fstpt  (%rsp)
call   1030 <fabsl@plt>
cmp    $0xf,%eax
jg     11d5 <exp10l+0x95>
fldz
fldt   0x38(%rsp)
fucomi %st(1),%st
fstp   %st(1)
jne    1184 <exp10l+0x44>
jnp    11ee <exp10l+0xae>
fldt   0xe86(%rip)
fmulp  %st,%st(1)
fstpt  (%rsp)
call   1050 <exp2l@plt>
fnstcw 0x1c(%rsp)
movzwl 0x1c(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x20(%rsp)
fldcw  0x20(%rsp)
fldt   0x2c(%rsp)
fistpl 0x24(%rsp)
fldcw  0x1c(%rsp)
movslq 0x24(%rsp),%rax
shl    $0x4,%rax
lea    0xe59(%rip),%rcx
fldt   0xf0(%rax,%rcx,1)
fmulp  %st,%st(1)
add    $0x68,%rsp
ret
fldt   0x44(%rsp)
fstpt  (%rsp)
movsd  0xe1c(%rip),%xmm0
call   1040 <powl@plt>
add    $0x68,%rsp
ret
fstp   %st(0)
fnstcw 0x1e(%rsp)
movzwl 0x1e(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x22(%rsp)
fldcw  0x22(%rsp)
fldt   0x2c(%rsp)
fistpl 0x28(%rsp)
fldcw  0x1e(%rsp)
movslq 0x28(%rsp),%rax
shl    $0x4,%rax
lea    0xdfd(%rip),%rcx
fldt   0xf0(%rax,%rcx,1)
add    $0x68,%rsp
ret

LLVM IR (-O0):
@exp10l.p10 = internal constant [31 x x86_fp80] [x86_fp80 0xK3FCD901D7CF73AB0B000, x86_fp80 0xK3FD0B424DC35095CD800, x86_fp80 0xK3FD3E12E13424BB41000, x86_fp80 0xK3FD78CBCCC096F508800, x86_fp80 0xK3FDAAFEBFF0BCB24A800, x86_fp80 0xK3FDDDBE6FECEBDEDD800, x86_fp80 0xK3FE189705F4136B4A800, x86_fp80 0xK3FE4ABCC77118461D000, x86_fp80 0xK3FE7D6BF94D5E57A4000, x86_fp80 0xK3FEB8637BD05AF6C6800, x86_fp80 0xK3FEEA7C5AC471B478800, x86_fp80 0xK3FF1D1B71758E2196800, x86_fp80 0xK3FF583126E978D4FE000, x86_fp80 0xK3FF8A3D70A3D70A3D800, x86_fp80 0xK3FFBCCCCCCCCCCCCD000, x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK4002A000000000000000, x86_fp80 0xK4005C800000000000000, x86_fp80 0xK4008FA00000000000000, x86_fp80 0xK400C9C40000000000000, x86_fp80 0xK400FC350000000000000, x86_fp80 0xK4012F424000000000000, x86_fp80 0xK40169896800000000000, x86_fp80 0xK4019BEBC200000000000, x86_fp80 0xK401CEE6B280000000000, x86_fp80 0xK40209502F90000000000, x86_fp80 0xK4023BA43B74000000000, x86_fp80 0xK4026E8D4A51000000000, x86_fp80 0xK402A9184E72A00000000, x86_fp80 0xK402DB5E620F480000000, x86_fp80 0xK4030E35FA931A0000000]
define x86_fp80 @exp10l(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
%7 = call x86_fp80 @modfl(x86_fp80 %6, x86_fp80* %4)
store x86_fp80 %7, x86_fp80* %5
%8 = load x86_fp80, x86_fp80* %4
%9 = call i32 @fabsl(x86_fp80 %8)
%10 = icmp slt i32 %9, 16
br i1 %10, label %11, label %33
11: ; preds = %1
%12 = load x86_fp80, x86_fp80* %5
%13 = fcmp une x86_fp80 %12, 0xK00000000000000000000
br i1 %13, label %21, label %14
14: ; preds = %11
%15 = load x86_fp80, x86_fp80* %4
%16 = fptosi x86_fp80 %15 to i32
%17 = add nsw i32 %16, 15
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [31 x x86_fp80], [31 x x86_fp80]* @exp10l.p10, i64 0, i64 %18
%20 = load x86_fp80, x86_fp80* %19
store x86_fp80 %20, x86_fp80* %2
br label %36
21: ; preds = %11
%22 = load x86_fp80, x86_fp80* %5
%23 = fmul x86_fp80 0xK4000D49A784BCD1B8AFE, %22
%24 = call x86_fp80 @exp2l(x86_fp80 %23)
store x86_fp80 %24, x86_fp80* %5
%25 = load x86_fp80, x86_fp80* %5
%26 = load x86_fp80, x86_fp80* %4
%27 = fptosi x86_fp80 %26 to i32
%28 = add nsw i32 %27, 15
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [31 x x86_fp80], [31 x x86_fp80]* @exp10l.p10, i64 0, i64 %29
%31 = load x86_fp80, x86_fp80* %30
%32 = fmul x86_fp80 %25, %31
store x86_fp80 %32, x86_fp80* %2
br label %36
33: ; preds = %1
%34 = load x86_fp80, x86_fp80* %3
%35 = call x86_fp80 @powl(double 1.000000e+01, x86_fp80 %34)
store x86_fp80 %35, x86_fp80* %2
br label %36
36: ; preds = %33, %21, %14
%37 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %37
}

LLVM IR (-O2):
@exp10l.p10 = internal unnamed_addr constant [31 x x86_fp80] [x86_fp80 0xK3FCD901D7CF73AB0B000, x86_fp80 0xK3FD0B424DC35095CD800, x86_fp80 0xK3FD3E12E13424BB41000, x86_fp80 0xK3FD78CBCCC096F508800, x86_fp80 0xK3FDAAFEBFF0BCB24A800, x86_fp80 0xK3FDDDBE6FECEBDEDD800, x86_fp80 0xK3FE189705F4136B4A800, x86_fp80 0xK3FE4ABCC77118461D000, x86_fp80 0xK3FE7D6BF94D5E57A4000, x86_fp80 0xK3FEB8637BD05AF6C6800, x86_fp80 0xK3FEEA7C5AC471B478800, x86_fp80 0xK3FF1D1B71758E2196800, x86_fp80 0xK3FF583126E978D4FE000, x86_fp80 0xK3FF8A3D70A3D70A3D800, x86_fp80 0xK3FFBCCCCCCCCCCCCD000, x86_fp80 0xK3FFF8000000000000000, x86_fp80 0xK4002A000000000000000, x86_fp80 0xK4005C800000000000000, x86_fp80 0xK4008FA00000000000000, x86_fp80 0xK400C9C40000000000000, x86_fp80 0xK400FC350000000000000, x86_fp80 0xK4012F424000000000000, x86_fp80 0xK40169896800000000000, x86_fp80 0xK4019BEBC200000000000, x86_fp80 0xK401CEE6B280000000000, x86_fp80 0xK40209502F90000000000, x86_fp80 0xK4023BA43B74000000000, x86_fp80 0xK4026E8D4A51000000000, x86_fp80 0xK402A9184E72A00000000, x86_fp80 0xK402DB5E620F480000000, x86_fp80 0xK4030E35FA931A0000000]
define x86_fp80 @exp10l(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = bitcast x86_fp80* %2 to i8*
%4 = call x86_fp80 @modfl(x86_fp80 %0, x86_fp80* %2)
%5 = load x86_fp80, x86_fp80* %2
%6 = tail call i32 @fabsl(x86_fp80 %5)
%7 = icmp slt i32 %6, 16
br i1 %7, label %8, label %25
8: ; preds = %1
%9 = fcmp une x86_fp80 %4, 0xK00000000000000000000
br i1 %9, label %16, label %10
10: ; preds = %8
%11 = fptosi x86_fp80 %5 to i32
%12 = add nsw i32 %11, 15
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [31 x x86_fp80], [31 x x86_fp80]* @exp10l.p10, i64 0, i64 %13
%15 = load x86_fp80, x86_fp80* %14
br label %27
16: ; preds = %8
%17 = fmul x86_fp80 %4, 0xK4000D49A784BCD1B8AFE
%18 = tail call x86_fp80 @exp2l(x86_fp80 %17)
%19 = fptosi x86_fp80 %5 to i32
%20 = add nsw i32 %19, 15
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [31 x x86_fp80], [31 x x86_fp80]* @exp10l.p10, i64 0, i64 %21
%23 = load x86_fp80, x86_fp80* %22
%24 = fmul x86_fp80 %18, %23
br label %27
25: ; preds = %1
%26 = tail call x86_fp80 @powl(double 1.000000e+01, x86_fp80 %0)
br label %27
27: ; preds = %25, %16, %10
%28 = phi x86_fp80 [ %24, %16 ], [ %15, %10 ], [ %26, %25 ]
ret x86_fp80 %28
}