#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 */
scalar_t__ EOF;
int isNumber(char *);
int /*<<< orphan*/ printf(char *, char *, int);
scalar_t__ scanf(char *, char *);
int main() {
  char buf[1024];
  printf("%s, %d\n", "1 ", isNumber("1 "));
  printf("%s, %d\n", "01.", isNumber("01."));
  while (scanf("%s", buf) != EOF) {
    printf("%s, %d\n", buf, isNumber(buf));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xebf(%rip),%rdi
call   1040 <isNumber@plt>
mov    %eax,%edx
lea    0xea9(%rip),%rdi
lea    0xeaa(%rip),%rsi
call   1030 <printf@plt>
lea    0xea1(%rip),%rdi
call   1040 <isNumber@plt>
mov    %eax,%edx
lea    0xe88(%rip),%rdi
lea    0xe8c(%rip),%rsi
call   1030 <printf@plt>
lea    -0x410(%rbp),%rsi
lea    0xe7d(%rip),%rdi
call   1050 <scanf@plt>
mov    0x2e4a(%rip),%rcx
cmp    (%rcx),%rax
je     11db <main+0xab>
lea    -0x410(%rbp),%rax
mov    %rax,-0x418(%rbp)
lea    -0x410(%rbp),%rdi
call   1040 <isNumber@plt>
mov    -0x418(%rbp),%rsi
mov    %eax,%edx
lea    0xe2f(%rip),%rdi
call   1030 <printf@plt>
jmp    1184 <main+0x54>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x408,%rsp
lea    0xec3(%rip),%rbx
mov    %rbx,%rdi
call   1040 <isNumber@plt>
lea    0xeac(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
lea    0xea3(%rip),%rbx
mov    %rbx,%rdi
call   1040 <isNumber@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
lea    0xe8b(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    0x2e55(%rip),%r12
cmp    (%r12),%rax
je     11d6 <main+0xa6>
mov    %rsp,%rbx
lea    0xe5d(%rip),%r14
lea    0xe65(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <isNumber@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmp    (%r12),%rax
jne    11b0 <main+0x80>
xor    %eax,%eax
add    $0x408,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%s, %d\0A\00"
@.str.1 = [3 x i8] c"1 \00"
@.str.2 = [4 x i8] c"01.\00"
@.str.3 = [3 x i8] c"%s\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
store i32 0, i32* %1
%3 = call i32 @isNumber(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 @isNumber(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %12, %0
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%9 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %8)
%10 = load i64, i64* @EOF
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %17
12: ; preds = %7
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%15 = call i32 @isNumber(i8* %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %15)
br label %7
17: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s, %d\0A\00"
@.str.1 = [3 x i8] c"1 \00"
@.str.2 = [4 x i8] c"01.\00"
@.str.3 = [3 x i8] c"%s\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @isNumber(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @isNumber(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%7 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%8 = load i64, i64* @EOF
%9 = icmp eq i64 %7, %8
br i1 %9, label %16, label %10
10: ; preds = %0, %10
%11 = call i32 @isNumber(i8* %2)
%12 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %11)
%13 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%14 = load i64, i64* @EOF
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %10
16: ; preds = %10, %0
ret i32 0
}