#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 KEY_F(int);
int KEY_F0;
scalar_t__ inp_isquit(int);
scalar_t__ iscntrl(int);
int inp_ismeta(int c) {
  int yes = 1, no = 0;
  if (inp_isquit(c))
    return no;
  if (iscntrl(c))
    return yes;
  if (KEY_F0 <= c && c <= KEY_F(12))
    return yes;
  else
    return no;
}


x86 assembly (clang, -O0):
<inp_ismeta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <inp_isquit@plt>
cmp    $0x0,%rax
je     1166 <inp_ismeta+0x36>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11c3 <inp_ismeta+0x93>
mov    -0x8(%rbp),%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
je     1183 <inp_ismeta+0x53>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11c3 <inp_ismeta+0x93>
mov    0x2e56(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jg     11bd <inp_ismeta+0x8d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0xc,%edi
call   1040 <KEY_F@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jg     11bd <inp_ismeta+0x8d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11c3 <inp_ismeta+0x93>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inp_ismeta>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1050 <inp_isquit@plt>
xor    %ebx,%ebx
test   %rax,%rax
jne    116d <inp_ismeta+0x3d>
mov    %ebp,%edi
call   1030 <iscntrl@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    116d <inp_ismeta+0x3d>
mov    0x2e87(%rip),%rax
cmp    %ebp,(%rax)
jg     116b <inp_ismeta+0x3b>
mov    $0xc,%edi
call   1040 <KEY_F@plt>
cmp    %ebp,%eax
jge    116d <inp_ismeta+0x3d>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@KEY_F0 = global i32 0
define i32 @inp_ismeta(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 1, i32* %4
store i32 0, i32* %5
%6 = load i32, i32* %3
%7 = call i64 @inp_isquit(i32 %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %5
store i32 %10, i32* %2
br label %29
11: ; preds = %1
%12 = load i32, i32* %3
%13 = call i64 @iscntrl(i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i32, i32* %4
store i32 %16, i32* %2
br label %29
17: ; preds = %11
%18 = load i32, i32* @KEY_F0
%19 = load i32, i32* %3
%20 = icmp sle i32 %18, %19
br i1 %20, label %21, label %27
21: ; preds = %17
%22 = load i32, i32* %3
%23 = call i32 @KEY_F(i32 12)
%24 = icmp sle i32 %22, %23
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = load i32, i32* %4
store i32 %26, i32* %2
br label %29
27: ; preds = %21, %17
%28 = load i32, i32* %5
store i32 %28, i32* %2
br label %29
29: ; preds = %27, %25, %15, %9
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
@KEY_F0 = global i32 0
define i32 @inp_ismeta(i32 %0) {
%2 = tail call i64 @inp_isquit(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %14
4: ; preds = %1
%5 = tail call i64 @iscntrl(i32 %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* @KEY_F0
%9 = icmp sgt i32 %8, %0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = tail call i32 @KEY_F(i32 12)
%12 = icmp slt i32 %11, %0
br i1 %12, label %13, label %14
13: ; preds = %10, %7
br label %14
14: ; preds = %10, %4, %1, %13
%15 = phi i32 [ 0, %13 ], [ 0, %1 ], [ 1, %4 ], [ 1, %10 ]
ret i32 %15
}