#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*/ FindTable(char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
int WatchTable(unsigned char syn, const char *name, int error) {
  if (syn == 11 || syn == 12 || syn == 13) {
    if (!FindTable(name)) {
      fprintf(stdout, "don't exist this var\n");
      fprintf(stdout, "wrong in %d line", error);
      return 0;
    }
    return 1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<WatchTable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0xb,%eax
je     115c <WatchTable+0x3c>
movzbl -0x5(%rbp),%eax
cmp    $0xc,%eax
je     115c <WatchTable+0x3c>
movzbl -0x5(%rbp),%eax
cmp    $0xd,%eax
jne    11b7 <WatchTable+0x97>
mov    -0x10(%rbp),%rdi
call   1040 <FindTable@plt>
cmp    $0x0,%eax
jne    11ab <WatchTable+0x8b>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
lea    0xe82(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xe7e(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    11be <WatchTable+0x9e>
movl   $0x1,-0x4(%rbp)
jmp    11be <WatchTable+0x9e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchTable>:
push   %rbp
push   %r14
push   %rbx
add    $0xf5,%dil
mov    $0x1,%ebp
cmp    $0x2,%dil
ja     116e <WatchTable+0x4e>
mov    %edx,%ebx
mov    %rsi,%rdi
call   1040 <FindTable@plt>
test   %eax,%eax
jne    116e <WatchTable+0x4e>
mov    0x2e98(%rip),%r14
mov    (%r14),%edi
lea    0xeae(%rip),%rsi
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xeb1(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [22 x i8] c"don't exist this var\0A\00"
@.str.1 = [17 x i8] c"wrong in %d line\00"
define i32 @WatchTable(i8 zeroext %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i32
store i8 %0, i8* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i8, i8* %5
%9 = zext i8 %8 to i32
%10 = icmp eq i32 %9, 11
br i1 %10, label %19, label %11
11: ; preds = %3
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = icmp eq i32 %13, 12
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = icmp eq i32 %17, 13
br i1 %18, label %19, label %30
19: ; preds = %15, %11, %3
%20 = load i8*, i8** %6
%21 = call i32 @FindTable(i8* %20)
%22 = icmp ne i32 %21, 0
br i1 %22, label %29, label %23
23: ; preds = %19
%24 = load i32, i32* @stdout
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%26 = load i32, i32* @stdout
%27 = load i32, i32* %7
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %27)
store i32 0, i32* %4
br label %31
29: ; preds = %19
store i32 1, i32* %4
br label %31
30: ; preds = %15
store i32 1, i32* %4
br label %31
31: ; preds = %30, %29, %23
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [22 x i8] c"don't exist this var\0A\00"
@.str.1 = [17 x i8] c"wrong in %d line\00"
define i32 @WatchTable(i8 zeroext %0, i8* %1, i32 %2) {
%4 = add i8 %0, -11
%5 = icmp ult i8 %4, 3
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = tail call i32 @FindTable(i8* %1)
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = load i32, i32* @stdout
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @stdout
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %2)
br label %14
14: ; preds = %3, %6, %9
%15 = phi i32 [ 0, %9 ], [ 1, %6 ], [ 1, %3 ]
ret i32 %15
}