#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 EOF;
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ compile_re();
int getchar();
scalar_t__ is_number(char *);
scalar_t__ isnumber(int);
int /*<<< orphan*/ match_print(char *);
int /*<<< orphan*/ printd(int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
int main(void) {
  int character, element = 0;
  char string[100];
  compile_re();
  while ((character = getchar()) != EOF) {
    if (element < 100) {
      if (isnumber(character) || character == '-' || character == '.')
        string[element++] = character;
      else {
        string[element] = '\0';
        if (is_number(string)) {
          match_print(string);
          printd(atoi(string));
          putchar('\n');
        }
        element = 0;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1090 <compile_re@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e3a(%rip),%rcx
cmp    (%rcx),%eax
je     1251 <main+0xd1>
cmpl   $0x64,-0xc(%rbp)
jge    124c <main+0xcc>
mov    -0x8(%rbp),%edi
call   1080 <isnumber@plt>
cmp    $0x0,%rax
jne    11e6 <main+0x66>
cmpl   $0x2d,-0x8(%rbp)
je     11e6 <main+0x66>
cmpl   $0x2e,-0x8(%rbp)
jne    1201 <main+0x81>
mov    -0x8(%rbp),%eax
mov    %al,%cl
mov    -0xc(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
cltq
mov    %cl,-0x70(%rbp,%rax,1)
jmp    1247 <main+0xc7>
movslq -0xc(%rbp),%rax
movb   $0x0,-0x70(%rbp,%rax,1)
lea    -0x70(%rbp),%rdi
call   1050 <is_number@plt>
cmp    $0x0,%rax
je     1240 <main+0xc0>
lea    -0x70(%rbp),%rdi
call   1070 <match_print@plt>
lea    -0x70(%rbp),%rdi
call   10a0 <atoi@plt>
mov    %eax,%edi
call   1040 <printd@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movl   $0x0,-0xc(%rbp)
jmp    124c <main+0xcc>
jmp    119d <main+0x1d>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x68,%rsp
xor    %eax,%eax
call   1090 <compile_re@plt>
xor    %eax,%eax
call   1060 <getchar@plt>
mov    0x2e49(%rip),%r15
cmp    (%r15),%eax
jne    11b1 <main+0x31>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,%ebx
mov    %rsp,%r14
xor    %ebp,%ebp
jmp    11d4 <main+0x54>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebp
mov    %bl,(%rsp,%rcx,1)
xor    %eax,%eax
call   1060 <getchar@plt>
mov    %eax,%ebx
cmp    (%r15),%eax
je     11a4 <main+0x24>
cmp    $0x63,%ebp
jg     11c6 <main+0x46>
mov    %ebx,%edi
call   1080 <isnumber@plt>
lea    -0x2d(%rbx),%edx
movslq %ebp,%rcx
cmp    $0x2,%edx
jb     11c0 <main+0x40>
test   %rax,%rax
jne    11c0 <main+0x40>
movb   $0x0,(%rsp,%rcx,1)
mov    %r14,%rdi
call   1050 <is_number@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     11c6 <main+0x46>
mov    %r14,%rdi
call   1070 <match_print@plt>
mov    %r14,%rdi
call   10a0 <atoi@plt>
mov    %eax,%edi
call   1040 <printd@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11c6 <main+0x46>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [100 x i8]
store i32 0, i32* %1
store i32 0, i32* %3
%5 = call i32 (...) @compile_re()
br label %6
6: ; preds = %46, %0
%7 = call i32 (...) @getchar()
store i32 %7, i32* %2
%8 = load i32, i32* @EOF
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %47
10: ; preds = %6
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 100
br i1 %12, label %13, label %46
13: ; preds = %10
%14 = load i32, i32* %2
%15 = call i64 @isnumber(i32 %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %23, label %17
17: ; preds = %13
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 45
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp eq i32 %21, 46
br i1 %22, label %23, label %30
23: ; preds = %20, %17, %13
%24 = load i32, i32* %2
%25 = trunc i32 %24 to i8
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
%28 = sext i32 %26 to i64
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %28
store i8 %25, i8* %29
br label %45
30: ; preds = %20
%31 = load i32, i32* %3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %32
store i8 0, i8* %33
%34 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%35 = call i64 @is_number(i8* %34)
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %44
37: ; preds = %30
%38 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%39 = call i32 @match_print(i8* %38)
%40 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%41 = call i32 @atoi(i8* %40)
%42 = call i32 @printd(i32 %41)
%43 = call i32 @putchar(i8 signext 10)
br label %44
44: ; preds = %37, %30
store i32 0, i32* %3
br label %45
45: ; preds = %44, %23
br label %46
46: ; preds = %45, %10
br label %6
47: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (...) @compile_re()
%4 = call i32 (...) @getchar()
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %37, label %7
7: ; preds = %0, %32
%8 = phi i32 [ %34, %32 ], [ %4, %0 ]
%9 = phi i32 [ %33, %32 ], [ 0, %0 ]
%10 = icmp slt i32 %9, 100
br i1 %10, label %11, label %32
11: ; preds = %7
%12 = call i64 @isnumber(i32 %8)
%13 = icmp ne i64 %12, 0
%14 = add i32 %8, -45
%15 = icmp ult i32 %14, 2
%16 = or i1 %15, %13
br i1 %16, label %17, label %22
17: ; preds = %11
%18 = trunc i32 %8 to i8
%19 = add nsw i32 %9, 1
%20 = sext i32 %9 to i64
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %20
store i8 %18, i8* %21
br label %32
22: ; preds = %11
%23 = sext i32 %9 to i64
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %23
store i8 0, i8* %24
%25 = call i64 @is_number(i8* %2)
%26 = icmp eq i64 %25, 0
br i1 %26, label %32, label %27
27: ; preds = %22
%28 = call i32 @match_print(i8* %2)
%29 = call i32 @atoi(i8* %2)
%30 = call i32 @printd(i32 %29)
%31 = call i32 @putchar(i8 signext 10)
br label %32
32: ; preds = %22, %27, %17, %7
%33 = phi i32 [ %19, %17 ], [ %9, %7 ], [ 0, %27 ], [ 0, %22 ]
%34 = call i32 (...) @getchar()
%35 = load i32, i32* @EOF
%36 = icmp eq i32 %34, %35
br i1 %36, label %37, label %7
37: ; preds = %32, %0
ret i32 0
}