#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__ amatch(char *, int);
scalar_t__ do_local_declares(int);
statement_declare() {
  if (amatch("register", 8))
    do_local_declares(6);
  else if (amatch("auto", 4))
    do_local_declares(6);
  else if (amatch("static", 6))
    do_local_declares(5);
  else if (do_local_declares(2))
    ;
  else
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<statement_declare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x8,%esi
call   1030 <amatch@plt>
cmp    $0x0,%rax
je     1152 <statement_declare+0x32>
mov    $0x6,%edi
call   1040 <do_local_declares@plt>
jmp    11da <statement_declare+0xba>
lea    0xeb0(%rip),%rdi
mov    $0x4,%esi
call   1030 <amatch@plt>
cmp    $0x0,%rax
je     117c <statement_declare+0x5c>
mov    $0x6,%edi
call   1040 <do_local_declares@plt>
jmp    11d5 <statement_declare+0xb5>
lea    0xe8b(%rip),%rdi
mov    $0x6,%esi
call   1030 <amatch@plt>
cmp    $0x0,%rax
je     11a6 <statement_declare+0x86>
mov    $0x5,%edi
call   1040 <do_local_declares@plt>
jmp    11d0 <statement_declare+0xb0>
mov    $0x2,%edi
call   1040 <do_local_declares@plt>
cmp    $0x0,%rax
je     11bf <statement_declare+0x9f>
jmp    11cb <statement_declare+0xab>
movl   $0x0,-0x4(%rbp)
jmp    11e1 <statement_declare+0xc1>
jmp    11d0 <statement_declare+0xb0>
jmp    11d5 <statement_declare+0xb5>
jmp    11da <statement_declare+0xba>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<statement_declare>:
push   %rbx
lea    0xed8(%rip),%rdi
mov    $0x8,%esi
call   1030 <amatch@plt>
mov    $0x6,%ebx
test   %rax,%rax
jne    116d <statement_declare+0x4d>
lea    0xec6(%rip),%rdi
mov    $0x4,%esi
call   1030 <amatch@plt>
test   %rax,%rax
jne    116d <statement_declare+0x4d>
lea    0xeb5(%rip),%rdi
mov    $0x6,%esi
call   1030 <amatch@plt>
mov    $0x5,%ebx
test   %rax,%rax
je     117b <statement_declare+0x5b>
mov    %ebx,%edi
call   1040 <do_local_declares@plt>
mov    $0x1,%eax
pop    %rbx
ret
mov    $0x2,%edi
call   1040 <do_local_declares@plt>
test   %rax,%rax
jne    1174 <statement_declare+0x54>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"register\00"
@.str.1 = [5 x i8] c"auto\00"
@.str.2 = [7 x i8] c"static\00"
define i32 @statement_declare() {
%1 = alloca i32
%2 = call i64 @amatch(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i64 @do_local_declares(i32 6)
br label %24
6: ; preds = %0
%7 = call i64 @amatch(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i64 @do_local_declares(i32 6)
br label %23
11: ; preds = %6
%12 = call i64 @amatch(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 6)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i64 @do_local_declares(i32 5)
br label %22
16: ; preds = %11
%17 = call i64 @do_local_declares(i32 2)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %16
br label %21
20: ; preds = %16
store i32 0, i32* %1
br label %25
21: ; preds = %19
br label %22
22: ; preds = %21, %14
br label %23
23: ; preds = %22, %9
br label %24
24: ; preds = %23, %4
store i32 1, i32* %1
br label %25
25: ; preds = %24, %20
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@.str = [9 x i8] c"register\00"
@.str.1 = [5 x i8] c"auto\00"
@.str.2 = [7 x i8] c"static\00"
define i32 @statement_declare() {
%1 = tail call i64 @amatch(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %12
3: ; preds = %0
%4 = tail call i64 @amatch(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = tail call i64 @amatch(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = tail call i64 @do_local_declares(i32 2)
%11 = icmp eq i64 %10, 0
br i1 %11, label %16, label %15
12: ; preds = %6, %3, %0
%13 = phi i32 [ 6, %0 ], [ 6, %3 ], [ 5, %6 ]
%14 = tail call i64 @do_local_declares(i32 %13)
br label %15
15: ; preds = %12, %9
br label %16
16: ; preds = %9, %15
%17 = phi i32 [ 1, %15 ], [ 0, %9 ]
ret i32 %17
}