#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__ strchr(char *, char);
int checkline(char *buf) {
  if (strchr(buf, '#'))
    return -1;
  if (strchr(buf, '@'))
    return -1;
  if (strchr(buf, '&'))
    return -1;
  if (strchr(buf, '$'))
    return -1;
  if (strchr(buf, '%'))
    return -1;
  if (strchr(buf, '\''))
    return -1;
  if (strchr(buf, '\\'))
    return -1;
  if (strchr(buf, '\t'))
    return -1;
  if (strchr(buf, '\r'))
    return -1;
  if (strchr(buf, '\a'))
    return -1;
  if (strchr(buf, '\b'))
    return -1;
  if (strchr(buf, '\f'))
    return -1;
  if (strchr(buf, '"'))
    return -1;
  if (buf[0] == '\n')
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<checkline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x23,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1140 <checkline+0x30>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0x40,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1164 <checkline+0x54>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0x26,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1188 <checkline+0x78>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0x24,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     11ac <checkline+0x9c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0x25,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     11d0 <checkline+0xc0>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0x27,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     11f4 <checkline+0xe4>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0x5c,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1218 <checkline+0x108>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0x9,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     123c <checkline+0x12c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0xd,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1260 <checkline+0x150>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0x7,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1284 <checkline+0x174>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0x8,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     12a8 <checkline+0x198>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0xc,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     12cc <checkline+0x1bc>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rdi
mov    $0x22,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     12f0 <checkline+0x1e0>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    130c <checkline+0x1fc>
movl   $0xffffffff,-0x4(%rbp)
jmp    1313 <checkline+0x203>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkline>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x23,%esi
call   1030 <strchr@plt>
mov    $0xffffffff,%ebp
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0x40,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0x26,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0x24,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0x25,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0x27,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0x5c,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0xd,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0xc,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
mov    %rbx,%rdi
mov    $0x22,%esi
call   1030 <strchr@plt>
test   %rax,%rax
jne    1225 <checkline+0x115>
xor    %ebp,%ebp
cmpb   $0xa,(%rbx)
sete   %bpl
neg    %ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @checkline(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strchr(i8* %4, i8 signext 35)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 -1, i32* %2
br label %76
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strchr(i8* %9, i8 signext 64)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 -1, i32* %2
br label %76
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = call i64 @strchr(i8* %14, i8 signext 38)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 -1, i32* %2
br label %76
18: ; preds = %13
%19 = load i8*, i8** %3
%20 = call i64 @strchr(i8* %19, i8 signext 36)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 -1, i32* %2
br label %76
23: ; preds = %18
%24 = load i8*, i8** %3
%25 = call i64 @strchr(i8* %24, i8 signext 37)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %23
store i32 -1, i32* %2
br label %76
28: ; preds = %23
%29 = load i8*, i8** %3
%30 = call i64 @strchr(i8* %29, i8 signext 39)
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %28
store i32 -1, i32* %2
br label %76
33: ; preds = %28
%34 = load i8*, i8** %3
%35 = call i64 @strchr(i8* %34, i8 signext 92)
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %38
37: ; preds = %33
store i32 -1, i32* %2
br label %76
38: ; preds = %33
%39 = load i8*, i8** %3
%40 = call i64 @strchr(i8* %39, i8 signext 9)
%41 = icmp ne i64 %40, 0
br i1 %41, label %42, label %43
42: ; preds = %38
store i32 -1, i32* %2
br label %76
43: ; preds = %38
%44 = load i8*, i8** %3
%45 = call i64 @strchr(i8* %44, i8 signext 13)
%46 = icmp ne i64 %45, 0
br i1 %46, label %47, label %48
47: ; preds = %43
store i32 -1, i32* %2
br label %76
48: ; preds = %43
%49 = load i8*, i8** %3
%50 = call i64 @strchr(i8* %49, i8 signext 7)
%51 = icmp ne i64 %50, 0
br i1 %51, label %52, label %53
52: ; preds = %48
store i32 -1, i32* %2
br label %76
53: ; preds = %48
%54 = load i8*, i8** %3
%55 = call i64 @strchr(i8* %54, i8 signext 8)
%56 = icmp ne i64 %55, 0
br i1 %56, label %57, label %58
57: ; preds = %53
store i32 -1, i32* %2
br label %76
58: ; preds = %53
%59 = load i8*, i8** %3
%60 = call i64 @strchr(i8* %59, i8 signext 12)
%61 = icmp ne i64 %60, 0
br i1 %61, label %62, label %63
62: ; preds = %58
store i32 -1, i32* %2
br label %76
63: ; preds = %58
%64 = load i8*, i8** %3
%65 = call i64 @strchr(i8* %64, i8 signext 34)
%66 = icmp ne i64 %65, 0
br i1 %66, label %67, label %68
67: ; preds = %63
store i32 -1, i32* %2
br label %76
68: ; preds = %63
%69 = load i8*, i8** %3
%70 = getelementptr inbounds i8, i8* %69, i64 0
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = icmp eq i32 %72, 10
br i1 %73, label %74, label %75
74: ; preds = %68
store i32 -1, i32* %2
br label %76
75: ; preds = %68
store i32 0, i32* %2
br label %76
76: ; preds = %75, %74, %67, %62, %57, %52, %47, %42, %37, %32, %27, %22, %17, %12, %7
%77 = load i32, i32* %2
ret i32 %77
}

LLVM IR (-O2):
define i32 @checkline(i8* %0) {
%2 = tail call i64 @strchr(i8* %0, i8 signext 35)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %44
4: ; preds = %1
%5 = tail call i64 @strchr(i8* %0, i8 signext 64)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %44
7: ; preds = %4
%8 = tail call i64 @strchr(i8* %0, i8 signext 38)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %44
10: ; preds = %7
%11 = tail call i64 @strchr(i8* %0, i8 signext 36)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %44
13: ; preds = %10
%14 = tail call i64 @strchr(i8* %0, i8 signext 37)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %44
16: ; preds = %13
%17 = tail call i64 @strchr(i8* %0, i8 signext 39)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %44
19: ; preds = %16
%20 = tail call i64 @strchr(i8* %0, i8 signext 92)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %44
22: ; preds = %19
%23 = tail call i64 @strchr(i8* %0, i8 signext 9)
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %44
25: ; preds = %22
%26 = tail call i64 @strchr(i8* %0, i8 signext 13)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %44
28: ; preds = %25
%29 = tail call i64 @strchr(i8* %0, i8 signext 7)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %44
31: ; preds = %28
%32 = tail call i64 @strchr(i8* %0, i8 signext 8)
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %44
34: ; preds = %31
%35 = tail call i64 @strchr(i8* %0, i8 signext 12)
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %44
37: ; preds = %34
%38 = tail call i64 @strchr(i8* %0, i8 signext 34)
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %44
40: ; preds = %37
%41 = load i8, i8* %0
%42 = icmp eq i8 %41, 10
%43 = sext i1 %42 to i32
br label %44
44: ; preds = %40, %37, %34, %31, %28, %25, %22, %19, %16, %13, %10, %7, %4, %1
%45 = phi i32 [ -1, %1 ], [ -1, %4 ], [ -1, %7 ], [ -1, %10 ], [ -1, %13 ], [ -1, %16 ], [ -1, %19 ], [ -1, %22 ], [ -1, %25 ], [ -1, %28 ], [ -1, %31 ], [ -1, %34 ], [ -1, %37 ], [ %43, %40 ]
ret i32 %45
}