#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 */
char getchar();
scalar_t__ isblank(char);
scalar_t__ isdigit(char);
double pow(double, double);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ ungetc(char, int /*<<< orphan*/);
double ReadDouble(void) {
  char c = 0;
  int sign = 1;
  int expsign = 1;
  double mant = 0.0;
  double frac = 1.0;
  double exp = 0.0;
  do {
    c = getchar();
  } while (isblank(c));
  if (c == '+' || c == '-') {
    if (c == '-') {
      sign = -1;
    }
    c = getchar();
  }
  while (isdigit(c)) {
    mant = mant * 10 + (c - '0');
    c = getchar();
  }
  if (c == '.') {
    c = getchar();
    if (isdigit(c)) {
      while (isdigit(c)) {
        mant = mant * 10 + (c - '0');
        frac *= 10.0;
        c = getchar();
      }
    }
    if (c == 'E' || c == 'e') {
      c = getchar();
      if (c == '+' || c == '-') {
        if (c == '-') {
          expsign = -1;
        }
        c = getchar();
      }
      if (isdigit(c)) {
        while (isdigit(c)) {
          exp = exp * 10 + (c - '0');
          c = getchar();
        }
      }
    }
    ungetc(c, stdin);
  } else if (c == 'E' || c == 'e') {
    c = getchar();
    if (c == '+' || c == '-') {
      if (c == '-') {
        expsign = -1;
      }
      c = getchar();
    }
    if (isdigit(c)) {
      while (isdigit(c)) {
        exp = exp * 10 + (c - '0');
        c = getchar();
      }
    }
    ungetc(c, stdin);
  } else {
    ungetc(c, stdin);
  }
  return (double)sign * mant / frac * pow(10.0, exp * (double)expsign);
}


x86 assembly (clang, -O0):
<ReadDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movb   $0x0,-0x1(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe86(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isblank@plt>
cmp    $0x0,%rax
jne    1187 <ReadDouble+0x37>
movsbl -0x1(%rbp),%eax
cmp    $0x2b,%eax
je     11be <ReadDouble+0x6e>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
jne    11dc <ReadDouble+0x8c>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
jne    11d2 <ReadDouble+0x82>
movl   $0xffffffff,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
jmp    11e1 <ReadDouble+0x91>
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1228 <ReadDouble+0xd8>
movsd  -0x18(%rbp),%xmm0
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
cvtsi2sd %eax,%xmm1
movsd  0xdfc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
jmp    11e1 <ReadDouble+0x91>
movsbl -0x1(%rbp),%eax
cmp    $0x2e,%eax
jne    1393 <ReadDouble+0x243>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     12b5 <ReadDouble+0x165>
jmp    1257 <ReadDouble+0x107>
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     12b0 <ReadDouble+0x160>
movsd  -0x18(%rbp),%xmm0
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
cvtsi2sd %eax,%xmm1
movsd  0xd86(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xd71(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
jmp    1257 <ReadDouble+0x107>
jmp    12b5 <ReadDouble+0x165>
movsbl -0x1(%rbp),%eax
cmp    $0x45,%eax
je     12cf <ReadDouble+0x17f>
movsbl -0x1(%rbp),%eax
cmp    $0x65,%eax
jne    137a <ReadDouble+0x22a>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x2b,%eax
je     12f3 <ReadDouble+0x1a3>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
jne    1311 <ReadDouble+0x1c1>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
jne    1307 <ReadDouble+0x1b7>
movl   $0xffffffff,-0xc(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1375 <ReadDouble+0x225>
jmp    1329 <ReadDouble+0x1d9>
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1370 <ReadDouble+0x220>
movsd  -0x28(%rbp),%xmm0
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
cvtsi2sd %eax,%xmm1
movsd  0xcb4(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
jmp    1329 <ReadDouble+0x1d9>
jmp    1375 <ReadDouble+0x225>
jmp    137a <ReadDouble+0x22a>
mov    -0x1(%rbp),%al
mov    0x2c64(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1060 <ungetc@plt>
jmp    1485 <ReadDouble+0x335>
movsbl -0x1(%rbp),%eax
cmp    $0x45,%eax
je     13ad <ReadDouble+0x25d>
movsbl -0x1(%rbp),%eax
cmp    $0x65,%eax
jne    146c <ReadDouble+0x31c>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x2b,%eax
je     13d1 <ReadDouble+0x281>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
jne    13ef <ReadDouble+0x29f>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
jne    13e5 <ReadDouble+0x295>
movl   $0xffffffff,-0xc(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1453 <ReadDouble+0x303>
jmp    1407 <ReadDouble+0x2b7>
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     144e <ReadDouble+0x2fe>
movsd  -0x28(%rbp),%xmm0
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
cvtsi2sd %eax,%xmm1
movsd  0xbd6(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x1(%rbp)
jmp    1407 <ReadDouble+0x2b7>
jmp    1453 <ReadDouble+0x303>
mov    -0x1(%rbp),%al
mov    0x2b8b(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1060 <ungetc@plt>
jmp    1480 <ReadDouble+0x330>
mov    -0x1(%rbp),%al
mov    0x2b72(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1060 <ungetc@plt>
jmp    1485 <ReadDouble+0x335>
cvtsi2sdl -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm1
cvtsi2sdl -0xc(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xb59(%rip),%xmm0
call   1070 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadDouble>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
movsbl %al,%edi
call   1040 <isblank@plt>
test   %rax,%rax
jne    1160 <ReadDouble+0x10>
mov    $0x1,%r14d
cmp    $0x2b,%bl
je     118c <ReadDouble+0x3c>
cmp    $0x2d,%bl
jne    1195 <ReadDouble+0x45>
mov    $0xffffffff,%r14d
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
movsbl %bl,%edi
call   1030 <isdigit@plt>
xorpd  %xmm1,%xmm1
test   %rax,%rax
je     11e9 <ReadDouble+0x99>
cs nopw 0x0(%rax,%rax,1)
movsbl %bl,%eax
add    $0xffffffd0,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xe3b(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
movsbl %al,%edi
call   1030 <isdigit@plt>
movsd  (%rsp),%xmm1
test   %rax,%rax
jne    11b0 <ReadDouble+0x60>
cmp    $0x2e,%bl
movsd  %xmm1,(%rsp)
jne    1292 <ReadDouble+0x142>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
movsbl %al,%ebp
mov    %ebp,%edi
call   1030 <isdigit@plt>
movsd  0xdf6(%rip),%xmm0
test   %rax,%rax
je     1350 <ReadDouble+0x200>
mov    %ebp,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     135b <ReadDouble+0x20b>
movsd  0xdd5(%rip),%xmm1
movsd  (%rsp),%xmm3
nopl   0x0(%rax,%rax,1)
movsbl %bl,%eax
add    $0xffffffd0,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xdab(%rip),%xmm2
mulsd  %xmm2,%xmm3
addsd  %xmm0,%xmm3
movsd  %xmm3,(%rsp)
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x10(%rsp)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
movsbl %al,%edi
call   1030 <isdigit@plt>
movsd  (%rsp),%xmm3
movsd  0x10(%rsp),%xmm1
test   %rax,%rax
jne    1240 <ReadDouble+0xf0>
jmp    1368 <ReadDouble+0x218>
mov    %ebx,%eax
and    $0xdf,%al
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xd60(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    $0x1,%r15d
cmp    $0x45,%al
jne    141b <ReadDouble+0x2cb>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    $0x1,%r15d
cmp    $0x2b,%al
je     12d9 <ReadDouble+0x189>
mov    %eax,%ebx
cmp    $0x2d,%al
jne    12e2 <ReadDouble+0x192>
mov    $0xffffffff,%r15d
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
movsbl %bl,%ebp
mov    %ebp,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     141b <ReadDouble+0x2cb>
mov    %ebp,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     141b <ReadDouble+0x2cb>
xorpd  %xmm1,%xmm1
nopl   0x0(%rax)
movsbl %bl,%eax
add    $0xffffffd0,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xcdb(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
movsbl %al,%edi
call   1030 <isdigit@plt>
movsd  0x8(%rsp),%xmm1
test   %rax,%rax
jne    1310 <ReadDouble+0x1c0>
jmp    141b <ReadDouble+0x2cb>
movsd  (%rsp),%xmm3
movapd %xmm0,%xmm1
jmp    1368 <ReadDouble+0x218>
movsd  (%rsp),%xmm3
movsd  0xca0(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  %xmm3,(%rsp)
mov    %ebx,%eax
and    $0xdf,%al
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%r15d
cmp    $0x45,%al
jne    141b <ReadDouble+0x2cb>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    $0x1,%r15d
cmp    $0x2b,%al
je     13ac <ReadDouble+0x25c>
mov    %eax,%ebx
cmp    $0x2d,%al
jne    13b5 <ReadDouble+0x265>
mov    $0xffffffff,%r15d
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
movsbl %bl,%ebp
mov    %ebp,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     141b <ReadDouble+0x2cb>
mov    %ebp,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     141b <ReadDouble+0x2cb>
xorpd  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl %bl,%eax
add    $0xffffffd0,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0xc0b(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebx
movsbl %al,%edi
call   1030 <isdigit@plt>
movsd  0x8(%rsp),%xmm1
test   %rax,%rax
jne    13e0 <ReadDouble+0x290>
mov    0x2bc6(%rip),%rax
mov    (%rax),%esi
movsbl %bl,%edi
call   1060 <ungetc@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  (%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %r15d,%xmm1
mulsd  0x8(%rsp),%xmm1
movsd  0xba6(%rip),%xmm0
call   1070 <pow@plt>
mulsd  (%rsp),%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
define double @ReadDouble() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i8 0, i8* %1
store i32 1, i32* %2
store i32 1, i32* %3
store double 0.000000e+00, double* %4
store double 1.000000e+00, double* %5
store double 0.000000e+00, double* %6
br label %7
7: ; preds = %9, %0
%8 = call signext i8 (...) @getchar()
store i8 %8, i8* %1
br label %9
9: ; preds = %7
%10 = load i8, i8* %1
%11 = call i64 @isblank(i8 signext %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %7, label %13
13: ; preds = %9
%14 = load i8, i8* %1
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 43
br i1 %16, label %21, label %17
17: ; preds = %13
%18 = load i8, i8* %1
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 45
br i1 %20, label %21, label %28
21: ; preds = %17, %13
%22 = load i8, i8* %1
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 45
br i1 %24, label %25, label %26
25: ; preds = %21
store i32 -1, i32* %2
br label %26
26: ; preds = %25, %21
%27 = call signext i8 (...) @getchar()
store i8 %27, i8* %1
br label %28
28: ; preds = %26, %17
br label %29
29: ; preds = %33, %28
%30 = load i8, i8* %1
%31 = call i64 @isdigit(i8 signext %30)
%32 = icmp ne i64 %31, 0
br i1 %32, label %33, label %41
33: ; preds = %29
%34 = load double, double* %4
%35 = load i8, i8* %1
%36 = sext i8 %35 to i32
%37 = sub nsw i32 %36, 48
%38 = sitofp i32 %37 to double
%39 = call double @llvm.fmuladd.f64(double %34, double 1.000000e+01, double %38)
store double %39, double* %4
%40 = call signext i8 (...) @getchar()
store i8 %40, i8* %1
br label %29
41: ; preds = %29
%42 = load i8, i8* %1
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 46
br i1 %44, label %45, label %113
45: ; preds = %41
%46 = call signext i8 (...) @getchar()
store i8 %46, i8* %1
%47 = load i8, i8* %1
%48 = call i64 @isdigit(i8 signext %47)
%49 = icmp ne i64 %48, 0
br i1 %49, label %50, label %66
50: ; preds = %45
br label %51
51: ; preds = %55, %50
%52 = load i8, i8* %1
%53 = call i64 @isdigit(i8 signext %52)
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %65
55: ; preds = %51
%56 = load double, double* %4
%57 = load i8, i8* %1
%58 = sext i8 %57 to i32
%59 = sub nsw i32 %58, 48
%60 = sitofp i32 %59 to double
%61 = call double @llvm.fmuladd.f64(double %56, double 1.000000e+01, double %60)
store double %61, double* %4
%62 = load double, double* %5
%63 = fmul double %62, 1.000000e+01
store double %63, double* %5
%64 = call signext i8 (...) @getchar()
store i8 %64, i8* %1
br label %51
65: ; preds = %51
br label %66
66: ; preds = %65, %45
%67 = load i8, i8* %1
%68 = sext i8 %67 to i32
%69 = icmp eq i32 %68, 69
br i1 %69, label %74, label %70
70: ; preds = %66
%71 = load i8, i8* %1
%72 = sext i8 %71 to i32
%73 = icmp eq i32 %72, 101
br i1 %73, label %74, label %109
74: ; preds = %70, %66
%75 = call signext i8 (...) @getchar()
store i8 %75, i8* %1
%76 = load i8, i8* %1
%77 = sext i8 %76 to i32
%78 = icmp eq i32 %77, 43
br i1 %78, label %83, label %79
79: ; preds = %74
%80 = load i8, i8* %1
%81 = sext i8 %80 to i32
%82 = icmp eq i32 %81, 45
br i1 %82, label %83, label %90
83: ; preds = %79, %74
%84 = load i8, i8* %1
%85 = sext i8 %84 to i32
%86 = icmp eq i32 %85, 45
br i1 %86, label %87, label %88
87: ; preds = %83
store i32 -1, i32* %3
br label %88
88: ; preds = %87, %83
%89 = call signext i8 (...) @getchar()
store i8 %89, i8* %1
br label %90
90: ; preds = %88, %79
%91 = load i8, i8* %1
%92 = call i64 @isdigit(i8 signext %91)
%93 = icmp ne i64 %92, 0
br i1 %93, label %94, label %108
94: ; preds = %90
br label %95
95: ; preds = %99, %94
%96 = load i8, i8* %1
%97 = call i64 @isdigit(i8 signext %96)
%98 = icmp ne i64 %97, 0
br i1 %98, label %99, label %107
99: ; preds = %95
%100 = load double, double* %6
%101 = load i8, i8* %1
%102 = sext i8 %101 to i32
%103 = sub nsw i32 %102, 48
%104 = sitofp i32 %103 to double
%105 = call double @llvm.fmuladd.f64(double %100, double 1.000000e+01, double %104)
store double %105, double* %6
%106 = call signext i8 (...) @getchar()
store i8 %106, i8* %1
br label %95
107: ; preds = %95
br label %108
108: ; preds = %107, %90
br label %109
109: ; preds = %108, %70
%110 = load i8, i8* %1
%111 = load i32, i32* @stdin
%112 = call i32 @ungetc(i8 signext %110, i32 %111)
br label %164
113: ; preds = %41
%114 = load i8, i8* %1
%115 = sext i8 %114 to i32
%116 = icmp eq i32 %115, 69
br i1 %116, label %121, label %117
117: ; preds = %113
%118 = load i8, i8* %1
%119 = sext i8 %118 to i32
%120 = icmp eq i32 %119, 101
br i1 %120, label %121, label %159
121: ; preds = %117, %113
%122 = call signext i8 (...) @getchar()
store i8 %122, i8* %1
%123 = load i8, i8* %1
%124 = sext i8 %123 to i32
%125 = icmp eq i32 %124, 43
br i1 %125, label %130, label %126
126: ; preds = %121
%127 = load i8, i8* %1
%128 = sext i8 %127 to i32
%129 = icmp eq i32 %128, 45
br i1 %129, label %130, label %137
130: ; preds = %126, %121
%131 = load i8, i8* %1
%132 = sext i8 %131 to i32
%133 = icmp eq i32 %132, 45
br i1 %133, label %134, label %135
134: ; preds = %130
store i32 -1, i32* %3
br label %135
135: ; preds = %134, %130
%136 = call signext i8 (...) @getchar()
store i8 %136, i8* %1
br label %137
137: ; preds = %135, %126
%138 = load i8, i8* %1
%139 = call i64 @isdigit(i8 signext %138)
%140 = icmp ne i64 %139, 0
br i1 %140, label %141, label %155
141: ; preds = %137
br label %142
142: ; preds = %146, %141
%143 = load i8, i8* %1
%144 = call i64 @isdigit(i8 signext %143)
%145 = icmp ne i64 %144, 0
br i1 %145, label %146, label %154
146: ; preds = %142
%147 = load double, double* %6
%148 = load i8, i8* %1
%149 = sext i8 %148 to i32
%150 = sub nsw i32 %149, 48
%151 = sitofp i32 %150 to double
%152 = call double @llvm.fmuladd.f64(double %147, double 1.000000e+01, double %151)
store double %152, double* %6
%153 = call signext i8 (...) @getchar()
store i8 %153, i8* %1
br label %142
154: ; preds = %142
br label %155
155: ; preds = %154, %137
%156 = load i8, i8* %1
%157 = load i32, i32* @stdin
%158 = call i32 @ungetc(i8 signext %156, i32 %157)
br label %163
159: ; preds = %117
%160 = load i8, i8* %1
%161 = load i32, i32* @stdin
%162 = call i32 @ungetc(i8 signext %160, i32 %161)
br label %163
163: ; preds = %159, %155
br label %164
164: ; preds = %163, %109
%165 = load i32, i32* %2
%166 = sitofp i32 %165 to double
%167 = load double, double* %4
%168 = fmul double %166, %167
%169 = load double, double* %5
%170 = fdiv double %168, %169
%171 = load double, double* %6
%172 = load i32, i32* %3
%173 = sitofp i32 %172 to double
%174 = fmul double %171, %173
%175 = call double @pow(double 1.000000e+01, double %174)
%176 = fmul double %170, %175
ret double %176
}

LLVM IR (-O2):
@stdin = global i32 0
define double @ReadDouble() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = tail call i64 @isblank(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
switch i8 %2, label %10 [
i8 45, label %6
i8 43, label %7
]
6: ; preds = %5
br label %7
7: ; preds = %5, %6
%8 = phi i32 [ -1, %6 ], [ 1, %5 ]
%9 = tail call signext i8 (...) @getchar()
br label %10
10: ; preds = %5, %7
%11 = phi i8 [ %9, %7 ], [ %2, %5 ]
%12 = phi i32 [ %8, %7 ], [ 1, %5 ]
%13 = tail call i64 @isdigit(i8 signext %11)
%14 = icmp eq i64 %13, 0
br i1 %14, label %25, label %15
15: ; preds = %10, %15
%16 = phi double [ %21, %15 ], [ 0.000000e+00, %10 ]
%17 = phi i8 [ %22, %15 ], [ %11, %10 ]
%18 = sext i8 %17 to i32
%19 = add nsw i32 %18, -48
%20 = sitofp i32 %19 to double
%21 = tail call double @llvm.fmuladd.f64(double %16, double 1.000000e+01, double %20)
%22 = tail call signext i8 (...) @getchar()
%23 = tail call i64 @isdigit(i8 signext %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %15
25: ; preds = %15, %10
%26 = phi i8 [ %11, %10 ], [ %22, %15 ]
%27 = phi double [ 0.000000e+00, %10 ], [ %21, %15 ]
%28 = icmp eq i8 %26, 46
br i1 %28, label %29, label %78
29: ; preds = %25
%30 = tail call signext i8 (...) @getchar()
%31 = tail call i64 @isdigit(i8 signext %30)
%32 = icmp eq i64 %31, 0
br i1 %32, label %48, label %33
33: ; preds = %29
%34 = tail call i64 @isdigit(i8 signext %30)
%35 = icmp eq i64 %34, 0
br i1 %35, label %48, label %36
36: ; preds = %33, %36
%37 = phi double [ %44, %36 ], [ 1.000000e+00, %33 ]
%38 = phi double [ %43, %36 ], [ %27, %33 ]
%39 = phi i8 [ %45, %36 ], [ %30, %33 ]
%40 = sext i8 %39 to i32
%41 = add nsw i32 %40, -48
%42 = sitofp i32 %41 to double
%43 = tail call double @llvm.fmuladd.f64(double %38, double 1.000000e+01, double %42)
%44 = fmul double %37, 1.000000e+01
%45 = tail call signext i8 (...) @getchar()
%46 = tail call i64 @isdigit(i8 signext %45)
%47 = icmp eq i64 %46, 0
br i1 %47, label %48, label %36
48: ; preds = %36, %33, %29
%49 = phi i8 [ %30, %29 ], [ %30, %33 ], [ %45, %36 ]
%50 = phi double [ %27, %29 ], [ %27, %33 ], [ %43, %36 ]
%51 = phi double [ 1.000000e+00, %29 ], [ 1.000000e+00, %33 ], [ %44, %36 ]
%52 = and i8 %49, -33
%53 = icmp eq i8 %52, 69
br i1 %53, label %54, label %105
54: ; preds = %48
%55 = tail call signext i8 (...) @getchar()
switch i8 %55, label %60 [
i8 45, label %56
i8 43, label %57
]
56: ; preds = %54
br label %57
57: ; preds = %54, %56
%58 = phi i32 [ -1, %56 ], [ 1, %54 ]
%59 = tail call signext i8 (...) @getchar()
br label %60
60: ; preds = %54, %57
%61 = phi i8 [ %59, %57 ], [ %55, %54 ]
%62 = phi i32 [ %58, %57 ], [ 1, %54 ]
%63 = tail call i64 @isdigit(i8 signext %61)
%64 = icmp eq i64 %63, 0
br i1 %64, label %105, label %65
65: ; preds = %60
%66 = tail call i64 @isdigit(i8 signext %61)
%67 = icmp eq i64 %66, 0
br i1 %67, label %105, label %68
68: ; preds = %65, %68
%69 = phi double [ %74, %68 ], [ 0.000000e+00, %65 ]
%70 = phi i8 [ %75, %68 ], [ %61, %65 ]
%71 = sext i8 %70 to i32
%72 = add nsw i32 %71, -48
%73 = sitofp i32 %72 to double
%74 = tail call double @llvm.fmuladd.f64(double %69, double 1.000000e+01, double %73)
%75 = tail call signext i8 (...) @getchar()
%76 = tail call i64 @isdigit(i8 signext %75)
%77 = icmp eq i64 %76, 0
br i1 %77, label %105, label %68
78: ; preds = %25
%79 = and i8 %26, -33
%80 = icmp eq i8 %79, 69
br i1 %80, label %81, label %105
81: ; preds = %78
%82 = tail call signext i8 (...) @getchar()
switch i8 %82, label %87 [
i8 45, label %83
i8 43, label %84
]
83: ; preds = %81
br label %84
84: ; preds = %81, %83
%85 = phi i32 [ -1, %83 ], [ 1, %81 ]
%86 = tail call signext i8 (...) @getchar()
br label %87
87: ; preds = %81, %84
%88 = phi i8 [ %86, %84 ], [ %82, %81 ]
%89 = phi i32 [ %85, %84 ], [ 1, %81 ]
%90 = tail call i64 @isdigit(i8 signext %88)
%91 = icmp eq i64 %90, 0
br i1 %91, label %105, label %92
92: ; preds = %87
%93 = tail call i64 @isdigit(i8 signext %88)
%94 = icmp eq i64 %93, 0
br i1 %94, label %105, label %95
95: ; preds = %92, %95
%96 = phi double [ %101, %95 ], [ 0.000000e+00, %92 ]
%97 = phi i8 [ %102, %95 ], [ %88, %92 ]
%98 = sext i8 %97 to i32
%99 = add nsw i32 %98, -48
%100 = sitofp i32 %99 to double
%101 = tail call double @llvm.fmuladd.f64(double %96, double 1.000000e+01, double %100)
%102 = tail call signext i8 (...) @getchar()
%103 = tail call i64 @isdigit(i8 signext %102)
%104 = icmp eq i64 %103, 0
br i1 %104, label %105, label %95
105: ; preds = %95, %68, %78, %87, %92, %48, %60, %65
%106 = phi i8 [ %61, %60 ], [ %49, %48 ], [ %61, %65 ], [ %88, %87 ], [ %88, %92 ], [ %26, %78 ], [ %75, %68 ], [ %102, %95 ]
%107 = phi i32 [ %62, %60 ], [ 1, %48 ], [ %62, %65 ], [ %89, %87 ], [ %89, %92 ], [ 1, %78 ], [ %62, %68 ], [ %89, %95 ]
%108 = phi double [ %50, %60 ], [ %50, %48 ], [ %50, %65 ], [ %27, %87 ], [ %27, %92 ], [ %27, %78 ], [ %50, %68 ], [ %27, %95 ]
%109 = phi double [ %51, %60 ], [ %51, %48 ], [ %51, %65 ], [ 1.000000e+00, %87 ], [ 1.000000e+00, %92 ], [ 1.000000e+00, %78 ], [ %51, %68 ], [ 1.000000e+00, %95 ]
%110 = phi double [ 0.000000e+00, %60 ], [ 0.000000e+00, %48 ], [ 0.000000e+00, %65 ], [ 0.000000e+00, %87 ], [ 0.000000e+00, %92 ], [ 0.000000e+00, %78 ], [ %74, %68 ], [ %101, %95 ]
%111 = load i32, i32* @stdin
%112 = tail call i32 @ungetc(i8 signext %106, i32 %111)
%113 = sitofp i32 %12 to double
%114 = fmul double %108, %113
%115 = fdiv double %114, %109
%116 = sitofp i32 %107 to double
%117 = fmul double %110, %116
%118 = tail call double @pow(double 1.000000e+01, double %117)
%119 = fmul double %115, %118
ret double %119
}