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


x86 assembly (clang, -O0):
<integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
call   1050 <getchar@plt>
add    $0xfffffff6,%eax
mov    %eax,%ecx
mov    %rcx,-0x8(%rbp)
sub    $0x2f,%eax
ja     11b3 <integer+0x63>
mov    -0x8(%rbp),%rax
lea    0xe84(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1070 <error@plt>
jmp    11b3 <integer+0x63>
mov    $0x0,%al
call   1060 <real@plt>
jmp    11b3 <integer+0x63>
call   1030 <integer@plt>
jmp    11b3 <integer+0x63>
lea    0xf12(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integer>:
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     1150 <integer+0x10>
add    $0xfffffff6,%eax
cmp    $0x24,%eax
ja     118c <integer+0x4c>
lea    0xe92(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %eax,%eax
pop    %rcx
jmp    1060 <error@plt>
lea    0xf0e(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1050 <real@plt>

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

LLVM IR (-O2):
@str = [21 x i8] c"Rejected by method 1\00"
define void @integer() {
br label %1
1: ; preds = %3, %0
%2 = tail call i32 (...) @getchar()
switch i32 %2, label %10 [
i32 43, label %4
i32 45, label %4
i32 46, label %6
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 %8
]
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
br label %1
4: ; preds = %1, %1
%5 = tail call i32 (...) @error()
br label %10
6: ; preds = %1
%7 = tail call i32 (...) @real()
br label %10
8: ; preds = %1
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %1, %4, %6, %8
ret void
}