double tle_expfld(char *l, int start) {
  char buf[32];
  double v;
  sprintf(buf, ".%.*s", 5, l + start);
  v = atod(buf) * pow(10.0, tle_fld(l, start + 6, start + 7));
  if (l[start - 1] == '-')
    v = -v;
  return (v);
}


x86 assembly (clang, -O0):
<tle_expfld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rax
add    %rax,%rcx
lea    0xea3(%rip),%rsi
mov    $0x5,%edx
mov    $0x0,%al
call   1060 <sprintf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x0,%al
call   1030 <atod@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
add    $0x6,%esi
mov    -0xc(%rbp),%edx
add    $0x7,%edx
mov    $0x0,%al
call   1040 <tle_fld@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe58(%rip),%xmm0
call   1050 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2d,%eax
jne    11f9 <tle_expfld+0xb9>
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tle_expfld>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rdi,%r15
movslq %esi,%rbx
lea    (%rdi,%rbx,1),%rcx
lea    0xec6(%rip),%rsi
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <sprintf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <atod@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x6(%rbx),%esi
lea    0x7(%rbx),%edx
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <tle_fld@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe62(%rip),%xmm0
call   1050 <pow@plt>
mulsd  0x8(%rsp),%xmm0
cmpb   $0x2d,-0x1(%r15,%rbx,1)
jne    11b9 <tle_expfld+0x79>
xorpd  0xe57(%rip),%xmm0
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c".%.*s\00"
define double @tle_expfld(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [32 x i8]
%6 = alloca double
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5, i8* %11)
%13 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%14 = call i32 (i8*, ...) bitcast (i32 (...)* @atod to i32 (i8*, ...)*)(i8* %13)
%15 = sitofp i32 %14 to double
%16 = load i8*, i8** %3
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 6
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 7
%21 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @tle_fld to i32 (i8*, i32, i32, ...)*)(i8* %16, i32 %18, i32 %20)
%22 = sitofp i32 %21 to double
%23 = call double @pow(double 1.000000e+01, double %22)
%24 = fmul double %15, %23
store double %24, double* %6
%25 = load i8*, i8** %3
%26 = load i32, i32* %4
%27 = sub nsw i32 %26, 1
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8, i8* %25, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 45
br i1 %32, label %33, label %36
33: ; preds = %2
%34 = load double, double* %6
%35 = fneg double %34
store double %35, double* %6
br label %36
36: ; preds = %33, %2
%37 = load double, double* %6
ret double %37
}

LLVM IR (-O2):
@.str = [6 x i8] c".%.*s\00"
define double @tle_expfld(i8* %0, i32 %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5, i8* %6)
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @atod to i32 (i8*, ...)*)(i8* %4)
%9 = sitofp i32 %8 to double
%10 = add nsw i32 %1, 6
%11 = add nsw i32 %1, 7
%12 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @tle_fld to i32 (i8*, i32, i32, ...)*)(i8* %0, i32 %10, i32 %11)
%13 = sitofp i32 %12 to double
%14 = call double @pow(double 1.000000e+01, double %13)
%15 = fmul double %14, %9
%16 = add nsw i32 %1, -1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %0, i64 %17
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 45
%21 = fneg double %15
%22 = select i1 %20, double %21, double %15
ret double %22
}