#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 /*<<< orphan*/ error();
int getchar();
int /*<<< orphan*/ printf(char *);
void real(void) {
  switch (getchar()) {
  case '+':
  case '-':
  case '.':
    error();
    return;
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7':
  case '8':
  case '9':
    real();
    return;
  case '\n':
    printf("Accepted by method 1\n");
    return;
  }
}


x86 assembly (clang, -O0):
<real>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ecx
mov    %ecx,-0x4(%rbp)
sub    $0xa,%eax
je     11b1 <real+0x71>
jmp    1162 <real+0x22>
mov    -0x4(%rbp),%eax
sub    $0x2b,%eax
je     119b <real+0x5b>
jmp    1173 <real+0x33>
mov    -0x4(%rbp),%eax
add    $0xffffffd3,%eax
sub    $0x2,%eax
jb     119b <real+0x5b>
jmp    1187 <real+0x47>
mov    -0x4(%rbp),%eax
add    $0xffffffd0,%eax
sub    $0xa,%eax
jb     11a7 <real+0x67>
jmp    11bd <real+0x7d>
mov    $0x0,%al
call   1060 <error@plt>
jmp    11bd <real+0x7d>
call   1050 <real@plt>
jmp    11bd <real+0x7d>
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<real>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
lea    -0x30(%rax),%ecx
cmp    $0xa,%ecx
jb     1140 <real+0x10>
lea    -0x2d(%rax),%ecx
cmp    $0x2,%ecx
jb     1161 <real+0x31>
cmp    $0xa,%eax
je     1169 <real+0x39>
cmp    $0x2b,%eax
jne    1176 <real+0x46>
xor    %eax,%eax
pop    %rcx
jmp    1050 <error@plt>
lea    0xe90(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Accepted by method 1\0A\00"
define void @real() {
%1 = call i32 (...) @getchar()
switch i32 %1, label %7 [
i32 43, label %2
i32 45, label %2
i32 46, label %2
i32 48, label %4
i32 49, label %4
i32 50, label %4
i32 51, label %4
i32 52, label %4
i32 53, label %4
i32 54, label %4
i32 55, label %4
i32 56, label %4
i32 57, label %4
i32 10, label %5
]
2: ; preds = %0, %0, %0
%3 = call i32 (...) @error()
br label %7
4: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
br label %7
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %2, %4, %5, %0
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"Accepted by method 1\00"
define void @real() {
br label %1
1: ; preds = %3, %0
%2 = tail call i32 (...) @getchar()
switch i32 %2, label %8 [
i32 43, label %4
i32 45, label %4
i32 46, label %4
i32 48, label %3
i32 49, label %3
i32 50, label %3
i32 51, label %3
i32 52, label %3
i32 53, label %3
i32 54, label %3
i32 55, label %3
i32 56, label %3
i32 57, label %3
i32 10, label %6
]
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
br label %1
4: ; preds = %1, %1, %1
%5 = tail call i32 (...) @error()
br label %8
6: ; preds = %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %8
8: ; preds = %1, %4, %6
ret void
}