#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 */
int isNumber(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *s[10];
  s[0] = "123";
  s[1] = " 0.1 ";
  s[2] = "bc";
  s[3] = "1 a";
  s[4] = "2e10";
  s[5] = "2e10.";
  s[6] = ".4";
  s[7] = "43.e4";
  s[8] = ".2e81";
  s[9] = "3.  ";
  for (int i = 0; i < 10; i++)
    printf("%d\n", isNumber(s[i]));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0xebe(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xeb6(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xeaf(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xea9(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xea4(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xe9c(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xe97(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xe92(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x64(%rbp)
cmpl   $0xa,-0x64(%rbp)
jge    11d8 <main+0xb8>
movslq -0x64(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rdi
call   1040 <isNumber@plt>
mov    %eax,%esi
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    11a4 <main+0x84>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <isNumber@plt>
lea    0xefc(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
call   1040 <isNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xeaf(%rip),%rdi
call   1040 <isNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xe9c(%rip),%rdi
call   1040 <isNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xe8a(%rip),%rdi
call   1040 <isNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xe79(%rip),%rdi
call   1040 <isNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xe69(%rip),%rdi
call   1040 <isNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xe56(%rip),%rdi
call   1040 <isNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xe46(%rip),%rdi
call   1040 <isNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
lea    0xe36(%rip),%rdi
call   1040 <isNumber@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
@.str.1 = [6 x i8] c" 0.1 \00"
@.str.2 = [3 x i8] c"bc\00"
@.str.3 = [4 x i8] c"1 a\00"
@.str.4 = [5 x i8] c"2e10\00"
@.str.5 = [6 x i8] c"2e10.\00"
@.str.6 = [3 x i8] c".4\00"
@.str.7 = [6 x i8] c"43.e4\00"
@.str.8 = [6 x i8] c".2e81\00"
@.str.9 = [5 x i8] c"3. \00"
@.str.10 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8*]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 2
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 3
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 4
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 5
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %9
%10 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 6
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8** %10
%11 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 7
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8** %11
%12 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 8
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 9
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8** %13
store i32 0, i32* %3
br label %14
14: ; preds = %24, %0
%15 = load i32, i32* %3
%16 = icmp slt i32 %15, 10
br i1 %16, label %17, label %27
17: ; preds = %14
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 %19
%21 = load i8*, i8** %20
%22 = call i32 @isNumber(i8* %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %17
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %14
27: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
@.str.1 = [6 x i8] c" 0.1 \00"
@.str.2 = [3 x i8] c"bc\00"
@.str.3 = [4 x i8] c"1 a\00"
@.str.4 = [5 x i8] c"2e10\00"
@.str.5 = [6 x i8] c"2e10.\00"
@.str.6 = [3 x i8] c".4\00"
@.str.7 = [6 x i8] c"43.e4\00"
@.str.8 = [6 x i8] c".2e81\00"
@.str.9 = [5 x i8] c"3. \00"
@.str.10 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @isNumber(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %1)
%3 = tail call i32 @isNumber(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %3)
%5 = tail call i32 @isNumber(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %5)
%7 = tail call i32 @isNumber(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %7)
%9 = tail call i32 @isNumber(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %9)
%11 = tail call i32 @isNumber(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %11)
%13 = tail call i32 @isNumber(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %13)
%15 = tail call i32 @isNumber(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%16 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %15)
%17 = tail call i32 @isNumber(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%18 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %17)
%19 = tail call i32 @isNumber(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%20 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 %19)
ret i32 0
}