#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*/ _any_except(char const, char *, int);
char const *_is_user(char const *peek) {
  if (!_any_except(*peek, "\r\n @\0", 5))
    return NULL;
  while (*peek) {
    if (!_any_except(*peek, "\r\n @\0", 5))
      break;
    peek++;
  }
  return peek;
}


x86 assembly (clang, -O0):
<_is_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rsi
mov    $0x5,%edx
movsbl (%rax),%edi
call   1030 <_any_except@plt>
cmp    $0x0,%eax
jne    114a <_is_user+0x3a>
movq   $0x0,-0x8(%rbp)
jmp    119b <_is_user+0x8b>
jmp    114f <_is_user+0x3f>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1193 <_is_user+0x83>
mov    -0x10(%rbp),%rax
lea    0xe99(%rip),%rsi
mov    $0x5,%edx
movsbl (%rax),%edi
call   1030 <_any_except@plt>
cmp    $0x0,%eax
jne    1182 <_is_user+0x72>
jmp    1193 <_is_user+0x83>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    114f <_is_user+0x3f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_user>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movsbl (%rdi),%edi
lea    0xedf(%rip),%rsi
mov    $0x5,%edx
call   1030 <_any_except@plt>
test   %eax,%eax
je     1162 <_is_user+0x52>
mov    (%rbx),%al
test   %al,%al
je     1164 <_is_user+0x54>
lea    0xec4(%rip),%r14
nopl   0x0(%rax)
movsbl %al,%edi
mov    %r14,%rsi
mov    $0x5,%edx
call   1030 <_any_except@plt>
test   %eax,%eax
je     1164 <_is_user+0x54>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <_is_user+0x30>
jmp    1164 <_is_user+0x54>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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