#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 atof(char *);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
void main(void) {
  char buf[256];
  float f;
  int i, len, isfloat;
  char *strs[] = {
      "-345",
      "0.00002",
      "0.000000000003",
      "5e12",
      "10.000000000003",
      "0",
      "0.0",
      "0.00000000000",
      "000000000000",
      ".0",
      ".000000000000000",
      "",
      "0.0.0",
      ".0000000000a00000",
      "0x00000",
      "0x01010",
      "+123",
      "fourty4",
  };
  for (i = 0; i < 18; i++) {
    isfloat = 1;
    f = atof(strs[i]);
    printf("original %s  float: %g\n", strs[i], f);
    len = strlen(strs[i]);
    if (len == 0) {
      isfloat = 0;
      printf("zero length\n");
    } else if (strs[i][0] == '+') {
      isfloat = 0;
      printf("start with +\n");
    } else if (strs[i][0] == '0' && strs[i][1] == 'x') {
      isfloat = 0;
      printf("hex not supported\n");
    } else if (f == 0) {
      if (len == 1 && strs[i][0] != '0') {
        isfloat = 0;
        printf("one length != 0\n");
      } else if (len > 1) {
        if ((strs[i][0] != '0' && strs[i][0] != '.' && strs[i][0] != '-') &&
            strs[i][1] != '0') {
          isfloat = 0;
          printf("> 1 but not .0 or -0\n");
        } else {
          char *str = &strs[i][2];
          int founddot = 0;
          while (*str != '\0') {
            if (*str == '.')
              founddot++;
            if ((*str != '0' && *str != '.') || founddot) {
              isfloat = 0;
              printf("found non-0 or non-.\n");
              break;
            }
            str++;
          }
        }
      }
    }
    printf("------------\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
lea    -0x1a0(%rbp),%rdi
lea    0x2c37(%rip),%rsi
mov    $0x90,%edx
call   1060 <memcpy@plt>
movl   $0x0,-0x108(%rbp)
cmpl   $0x12,-0x108(%rbp)
jge    1494 <main+0x354>
movl   $0x1,-0x110(%rbp)
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rdi
ff
call   1030 <atof@plt>
movss  %xmm0,-0x104(%rbp)
ff
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rsi
ff
movss  -0x104(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xeb4(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rdi
ff
call   1040 <strlen@plt>
mov    %eax,-0x10c(%rbp)
cmpl   $0x0,-0x10c(%rbp)
jne    120d <main+0xcd>
movl   $0x0,-0x110(%rbp)
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1472 <main+0x332>
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rax
ff
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    1245 <main+0x105>
movl   $0x0,-0x110(%rbp)
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    146d <main+0x32d>
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rax
ff
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1299 <main+0x159>
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rax
ff
movsbl 0x1(%rax),%eax
cmp    $0x78,%eax
jne    1299 <main+0x159>
movl   $0x0,-0x110(%rbp)
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1468 <main+0x328>
movss  -0x104(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1463 <main+0x323>
jp     1463 <main+0x323>
cmpl   $0x1,-0x10c(%rbp)
jne    12f8 <main+0x1b8>
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rax
ff
movsbl (%rax),%eax
cmp    $0x30,%eax
je     12f8 <main+0x1b8>
movl   $0x0,-0x110(%rbp)
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    145e <main+0x31e>
cmpl   $0x1,-0x10c(%rbp)
jle    1459 <main+0x319>
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rax
ff
movsbl (%rax),%eax
cmp    $0x30,%eax
je     138f <main+0x24f>
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rax
ff
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     138f <main+0x24f>
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rax
ff
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     138f <main+0x24f>
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rax
ff
movsbl 0x1(%rax),%eax
cmp    $0x30,%eax
je     138f <main+0x24f>
movl   $0x0,-0x110(%rbp)
lea    0xd4a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1454 <main+0x314>
movslq -0x108(%rbp),%rax
mov    -0x1a0(%rbp,%rax,8),%rax
ff
add    $0x2,%rax
mov    %rax,-0x1a8(%rbp)
movl   $0x0,-0x1ac(%rbp)
mov    -0x1a8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     144f <main+0x30f>
mov    -0x1a8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    13e8 <main+0x2a8>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
mov    -0x1a8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
je     140e <main+0x2ce>
mov    -0x1a8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    141b <main+0x2db>
cmpl   $0x0,-0x1ac(%rbp)
je     1438 <main+0x2f8>
movl   $0x0,-0x110(%rbp)
lea    0xcb7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    144f <main+0x30f>
mov    -0x1a8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x1a8(%rbp)
jmp    13b3 <main+0x273>
jmp    1454 <main+0x314>
jmp    1459 <main+0x319>
jmp    145e <main+0x31e>
jmp    1463 <main+0x323>
jmp    1468 <main+0x328>
jmp    146d <main+0x32d>
jmp    1472 <main+0x332>
lea    0xc80(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x108(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x108(%rbp)
jmp    116d <main+0x2d>
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %r12d,%r12d
lea    0x2c3b(%rip),%r13
lea    0xf1e(%rip),%r14
lea    0xf95(%rip),%rbp
lea    0xf28(%rip),%r15
jmp    118b <main+0x4b>
nopl   0x0(%rax)
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
add    $0x1,%r12
cmp    $0x12,%r12
je     1264 <main+0x124>
mov    0x0(%r13,%r12,8),%rbx
mov    %rbx,%rdi
call   1040 <atof@plt>
movss  %xmm0,0x4(%rsp)
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x1,%al
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %rbp,%rdi
test   %eax,%eax
je     1170 <main+0x30>
mov    (%rbx),%cl
lea    0xf24(%rip),%rdi
cmp    $0x2b,%cl
je     1170 <main+0x30>
cmp    $0x30,%cl
jne    11de <main+0x9e>
cmpb   $0x78,0x1(%rbx)
lea    0xefd(%rip),%rdi
je     1170 <main+0x30>
movss  0x4(%rsp),%xmm0
ucomiss 0xe15(%rip),%xmm0
jne    1175 <main+0x35>
jp     1175 <main+0x35>
cmp    $0x1,%eax
jne    1209 <main+0xc9>
lea    0xece(%rip),%rdi
cmp    $0x30,%cl
jne    1170 <main+0x30>
jmp    1175 <main+0x35>
jle    1175 <main+0x35>
cmp    $0x30,%cl
ja     1251 <main+0x111>
movzbl %cl,%eax
movabs $0x1600000000000,%rcx
bt     %rax,%rcx
jae    1251 <main+0x111>
add    $0x2,%rbx
nopl   0x0(%rax,%rax,1)
movzbl (%rbx),%eax
cmp    $0x30,%al
jne    123d <main+0xfd>
add    $0x1,%rbx
jmp    1230 <main+0xf0>
test   %al,%al
je     1175 <main+0x35>
lea    0xe53(%rip),%rdi
jmp    1170 <main+0x30>
cmpb   $0x30,0x1(%rbx)
lea    0xe58(%rip),%rdi
jne    1170 <main+0x30>
jmp    1227 <main+0xe7>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"-345\00"
@.str.1 = [8 x i8] c"0.00002\00"
@.str.2 = [15 x i8] c"0.000000000003\00"
@.str.3 = [5 x i8] c"5e12\00"
@.str.4 = [16 x i8] c"10.000000000003\00"
@.str.5 = [2 x i8] c"0\00"
@.str.6 = [4 x i8] c"0.0\00"
@.str.7 = [14 x i8] c"0.00000000000\00"
@.str.8 = [13 x i8] c"000000000000\00"
@.str.9 = [3 x i8] c".0\00"
@.str.10 = [17 x i8] c".000000000000000\00"
@.str.11 = [1 x i8] zeroinitializer
@.str.12 = [6 x i8] c"0.0.0\00"
@.str.13 = [18 x i8] c".0000000000a00000\00"
@.str.14 = [8 x i8] c"0x00000\00"
@.str.15 = [8 x i8] c"0x01010\00"
@.str.16 = [5 x i8] c"+123\00"
@.str.17 = [8 x i8] c"fourty4\00"
@__const.main.strs = [18 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i32 0, i32 0)]
@.str.18 = [24 x i8] c"original %s float: %g\0A\00"
@.str.19 = [13 x i8] c"zero length\0A\00"
@.str.20 = [14 x i8] c"start with +\0A\00"
@.str.21 = [19 x i8] c"hex not supported\0A\00"
@.str.22 = [17 x i8] c"one length != 0\0A\00"
@.str.23 = [22 x i8] c"> 1 but not .0 or -0\0A\00"
@.str.24 = [22 x i8] c"found non-0 or non-.\0A\00"
@.str.25 = [14 x i8] c"------------\0A\00"
define void @main() {
%1 = alloca [256 x i8]
%2 = alloca float
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [18 x i8*]
%7 = alloca i8*
%8 = alloca i32
%9 = bitcast [18 x i8*]* %6 to i8*
store i32 0, i32* %3
br label %10
10: ; preds = %170, %0
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 18
br i1 %12, label %13, label %173
13: ; preds = %10
store i32 1, i32* %5
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %15
%17 = load i8*, i8** %16
%18 = call float @atof(i8* %17)
store float %18, float* %2
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %20
%22 = load i8*, i8** %21
%23 = load float, float* %2
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.18, i64 0, i64 0), i8* %22, double %24)
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %27
%29 = load i8*, i8** %28
%30 = call i32 @strlen(i8* %29)
store i32 %30, i32* %4
%31 = load i32, i32* %4
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %13
store i32 0, i32* %5
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.19, i64 0, i64 0))
br label %168
35: ; preds = %13
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %37
%39 = load i8*, i8** %38
%40 = getelementptr inbounds i8, i8* %39, i64 0
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 43
br i1 %43, label %44, label %46
44: ; preds = %35
store i32 0, i32* %5
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.20, i64 0, i64 0))
br label %167
46: ; preds = %35
%47 = load i32, i32* %3
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %48
%50 = load i8*, i8** %49
%51 = getelementptr inbounds i8, i8* %50, i64 0
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = icmp eq i32 %53, 48
br i1 %54, label %55, label %66
55: ; preds = %46
%56 = load i32, i32* %3
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %57
%59 = load i8*, i8** %58
%60 = getelementptr inbounds i8, i8* %59, i64 1
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = icmp eq i32 %62, 120
br i1 %63, label %64, label %66
64: ; preds = %55
store i32 0, i32* %5
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0))
br label %166
66: ; preds = %55, %46
%67 = load float, float* %2
%68 = fcmp oeq float %67, 0.000000e+00
br i1 %68, label %69, label %165
69: ; preds = %66
%70 = load i32, i32* %4
%71 = icmp eq i32 %70, 1
br i1 %71, label %72, label %83
72: ; preds = %69
%73 = load i32, i32* %3
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %74
%76 = load i8*, i8** %75
%77 = getelementptr inbounds i8, i8* %76, i64 0
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = icmp ne i32 %79, 48
br i1 %80, label %81, label %83
81: ; preds = %72
store i32 0, i32* %5
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.22, i64 0, i64 0))
br label %164
83: ; preds = %72, %69
%84 = load i32, i32* %4
%85 = icmp sgt i32 %84, 1
br i1 %85, label %86, label %163
86: ; preds = %83
%87 = load i32, i32* %3
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %88
%90 = load i8*, i8** %89
%91 = getelementptr inbounds i8, i8* %90, i64 0
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = icmp ne i32 %93, 48
br i1 %94, label %95, label %124
95: ; preds = %86
%96 = load i32, i32* %3
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %97
%99 = load i8*, i8** %98
%100 = getelementptr inbounds i8, i8* %99, i64 0
%101 = load i8, i8* %100
%102 = sext i8 %101 to i32
%103 = icmp ne i32 %102, 46
br i1 %103, label %104, label %124
104: ; preds = %95
%105 = load i32, i32* %3
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %106
%108 = load i8*, i8** %107
%109 = getelementptr inbounds i8, i8* %108, i64 0
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
%112 = icmp ne i32 %111, 45
br i1 %112, label %113, label %124
113: ; preds = %104
%114 = load i32, i32* %3
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %115
%117 = load i8*, i8** %116
%118 = getelementptr inbounds i8, i8* %117, i64 1
%119 = load i8, i8* %118
%120 = sext i8 %119 to i32
%121 = icmp ne i32 %120, 48
br i1 %121, label %122, label %124
122: ; preds = %113
store i32 0, i32* %5
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.23, i64 0, i64 0))
br label %162
124: ; preds = %113, %104, %95, %86
%125 = load i32, i32* %3
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [18 x i8*], [18 x i8*]* %6, i64 0, i64 %126
%128 = load i8*, i8** %127
%129 = getelementptr inbounds i8, i8* %128, i64 2
store i8* %129, i8** %7
store i32 0, i32* %8
br label %130
130: ; preds = %158, %124
%131 = load i8*, i8** %7
%132 = load i8, i8* %131
%133 = sext i8 %132 to i32
%134 = icmp ne i32 %133, 0
br i1 %134, label %135, label %161
135: ; preds = %130
%136 = load i8*, i8** %7
%137 = load i8, i8* %136
%138 = sext i8 %137 to i32
%139 = icmp eq i32 %138, 46
br i1 %139, label %140, label %143
140: ; preds = %135
%141 = load i32, i32* %8
%142 = add nsw i32 %141, 1
store i32 %142, i32* %8
br label %143
143: ; preds = %140, %135
%144 = load i8*, i8** %7
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp ne i32 %146, 48
br i1 %147, label %148, label %153
148: ; preds = %143
%149 = load i8*, i8** %7
%150 = load i8, i8* %149
%151 = sext i8 %150 to i32
%152 = icmp ne i32 %151, 46
br i1 %152, label %156, label %153
153: ; preds = %148, %143
%154 = load i32, i32* %8
%155 = icmp ne i32 %154, 0
br i1 %155, label %156, label %158
156: ; preds = %153, %148
store i32 0, i32* %5
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.24, i64 0, i64 0))
br label %161
158: ; preds = %153
%159 = load i8*, i8** %7
%160 = getelementptr inbounds i8, i8* %159, i32 1
store i8* %160, i8** %7
br label %130
161: ; preds = %156, %130
br label %162
162: ; preds = %161, %122
br label %163
163: ; preds = %162, %83
br label %164
164: ; preds = %163, %81
br label %165
165: ; preds = %164, %66
br label %166
166: ; preds = %165, %64
br label %167
167: ; preds = %166, %44
br label %168
168: ; preds = %167, %33
%169 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.25, i64 0, i64 0))
br label %170
170: ; preds = %168
%171 = load i32, i32* %3
%172 = add nsw i32 %171, 1
store i32 %172, i32* %3
br label %10
173: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"-345\00"
@.str.1 = [8 x i8] c"0.00002\00"
@.str.2 = [15 x i8] c"0.000000000003\00"
@.str.3 = [5 x i8] c"5e12\00"
@.str.4 = [16 x i8] c"10.000000000003\00"
@.str.5 = [2 x i8] c"0\00"
@.str.6 = [4 x i8] c"0.0\00"
@.str.7 = [14 x i8] c"0.00000000000\00"
@.str.8 = [13 x i8] c"000000000000\00"
@.str.9 = [3 x i8] c".0\00"
@.str.10 = [17 x i8] c".000000000000000\00"
@.str.11 = [1 x i8] zeroinitializer
@.str.12 = [6 x i8] c"0.0.0\00"
@.str.13 = [18 x i8] c".0000000000a00000\00"
@.str.14 = [8 x i8] c"0x00000\00"
@.str.15 = [8 x i8] c"0x01010\00"
@.str.16 = [5 x i8] c"+123\00"
@.str.17 = [8 x i8] c"fourty4\00"
@__const.main.strs = [18 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i32 0, i32 0)]
@.str.18 = [24 x i8] c"original %s float: %g\0A\00"
@str = [13 x i8] c"------------\00"
@str.26 = [21 x i8] c"found non-0 or non-.\00"
@str.27 = [21 x i8] c"> 1 but not .0 or -0\00"
@str.28 = [16 x i8] c"one length != 0\00"
@str.29 = [18 x i8] c"hex not supported\00"
@str.30 = [13 x i8] c"start with +\00"
@str.31 = [12 x i8] c"zero length\00"
define void @main() {
br label %1
1: ; preds = %0, %39
%2 = phi i64 [ 0, %0 ], [ %41, %39 ]
%3 = getelementptr inbounds [18 x i8*], [18 x i8*]* @__const.main.strs, i64 0, i64 %2
%4 = load i8*, i8** %3
%5 = tail call float @atof(i8* %4)
%6 = fpext float %5 to double
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.18, i64 0, i64 0), i8* %4, double %6)
%8 = tail call i32 @strlen(i8* %4)
%9 = icmp eq i32 %8, 0
br i1 %9, label %36, label %10
10: ; preds = %1
%11 = load i8, i8* %4
switch i8 %11, label %16 [
i8 43, label %36
i8 48, label %12
]
12: ; preds = %10
%13 = getelementptr inbounds i8, i8* %4, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 120
br i1 %15, label %36, label %16
16: ; preds = %10, %12
%17 = fcmp oeq float %5, 0.000000e+00
br i1 %17, label %18, label %39
18: ; preds = %16
%19 = icmp eq i32 %8, 1
br i1 %19, label %20, label %22
20: ; preds = %18
%21 = icmp eq i8 %11, 48
br i1 %21, label %39, label %36
22: ; preds = %18
%23 = icmp sgt i32 %8, 1
br i1 %23, label %24, label %39
24: ; preds = %22
switch i8 %11, label %25 [
i8 48, label %29
i8 46, label %29
i8 45, label %29
]
25: ; preds = %24
%26 = getelementptr inbounds i8, i8* %4, i64 1
%27 = load i8, i8* %26
%28 = icmp eq i8 %27, 48
br i1 %28, label %29, label %36
29: ; preds = %24, %24, %24, %25
%30 = getelementptr inbounds i8, i8* %4, i64 2
br label %31
31: ; preds = %34, %29
%32 = phi i8* [ %30, %29 ], [ %35, %34 ]
%33 = load i8, i8* %32
switch i8 %33, label %36 [
i8 0, label %39
i8 48, label %34
]
34: ; preds = %31
%35 = getelementptr inbounds i8, i8* %32, i64 1
br label %31
36: ; preds = %31, %25, %20, %12, %10, %1
%37 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.31, i64 0, i64 0), %1 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @str.30, i64 0, i64 0), %10 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.29, i64 0, i64 0), %12 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.28, i64 0, i64 0), %20 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.27, i64 0, i64 0), %25 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.26, i64 0, i64 0), %31 ]
%38 = tail call i32 @puts(i8* dereferenceable(1) %37)
br label %39
39: ; preds = %31, %36, %20, %16, %22
%40 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%41 = add nuw nsw i64 %2, 1
%42 = icmp eq i64 %41, 18
br i1 %42, label %43, label %1
43: ; preds = %39
ret void
}