#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__ isspace(char);
int /*<<< orphan*/ l_putback(char);
char l_readchar();
char *l_next(void) {
  static char buff[256];
  char *c = buff;
  while (isspace(*c = l_readchar()))
    ;
  if (*c != ')' && *c != '(' && *c != '"') {
    while (!isspace(*(c + 1) = l_readchar()) && *(c + 1) != '(' &&
           *(c + 1) != ')')
      c++;
    l_putback(*(c + 1));
  } else if (*c == '"') {
    while ((*(++c) = l_readchar()) != '"')
      if (*c == '\\')
        *(++c) = l_readchar();
  }
  *(c + 1) = '\0';
  return buff;
}


x86 assembly (clang, -O0):
<l_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0x2f11(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <l_readchar@plt>
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     1167 <l_next+0x37>
jmp    1143 <l_next+0x13>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
je     121e <l_next+0xee>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x28,%eax
je     121e <l_next+0xee>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
je     121e <l_next+0xee>
jmp    119c <l_next+0x6c>
mov    $0x0,%al
call   1030 <l_readchar@plt>
mov    -0x8(%rbp),%rcx
mov    %al,0x1(%rcx)
movsbl %al,%edi
call   1040 <isspace@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    11eb <l_next+0xbb>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
xor    %eax,%eax
cmp    $0x28,%ecx
mov    %al,-0x9(%rbp)
je     11eb <l_next+0xbb>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x29,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    11fb <l_next+0xcb>
jmp    120c <l_next+0xdc>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    119c <l_next+0x6c>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1050 <l_putback@plt>
jmp    1292 <l_next+0x162>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x22,%eax
jne    128d <l_next+0x15d>
jmp    1233 <l_next+0x103>
mov    $0x0,%al
call   1030 <l_readchar@plt>
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,0x1(%rcx)
movsbl %al,%eax
cmp    $0x22,%eax
je     1288 <l_next+0x158>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
jne    1283 <l_next+0x153>
mov    $0x0,%al
call   1030 <l_readchar@plt>
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,0x1(%rax)
jmp    1233 <l_next+0x103>
jmp    128d <l_next+0x15d>
jmp    1292 <l_next+0x162>
mov    -0x8(%rbp),%rax
movb   $0x0,0x1(%rax)
lea    0x2daf(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l_next>:
push   %rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <l_readchar@plt>
mov    %al,0x2f03(%rip)
movsbl %al,%edi
call   1040 <isspace@plt>
test   %rax,%rax
jne    1140 <l_next+0x10>
mov    0x2ef0(%rip),%al
lea    -0x28(%rax),%ecx
cmp    $0x2,%cl
jae    1171 <l_next+0x41>
lea    0x2ee1(%rip),%rbx
jmp    11df <l_next+0xaf>
cmp    $0x22,%al
jne    11a6 <l_next+0x76>
lea    0x2ed4(%rip),%rbx
jmp    118e <l_next+0x5e>
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <l_readchar@plt>
mov    %al,0x2(%rbx)
add    $0x2,%rbx
xor    %eax,%eax
call   1030 <l_readchar@plt>
mov    %al,0x1(%rbx)
cmp    $0x5c,%al
je     1180 <l_next+0x50>
add    $0x1,%rbx
cmp    $0x22,%al
jne    118e <l_next+0x5e>
jmp    11df <l_next+0xaf>
lea    0x2ea2(%rip),%rbx
nopl   (%rax)
xor    %eax,%eax
call   1030 <l_readchar@plt>
mov    %al,0x2(%rbx)
movsbl %al,%edi
call   1040 <isspace@plt>
movzbl 0x2(%rbx),%ecx
add    $0x1,%rbx
test   %rax,%rax
jne    11d7 <l_next+0xa7>
mov    %ecx,%eax
and    $0xfe,%al
cmp    $0x28,%al
jne    11b0 <l_next+0x80>
movsbl %cl,%edi
call   1050 <l_putback@plt>
movb   $0x0,0x1(%rbx)
lea    0x2e66(%rip),%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@l_next.buff = internal global [256 x i8] zeroinitializer
define i8* @l_next() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @l_readchar()
store i8 %2, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @l_next.buff, i64 0, i64 0)
%3 = tail call i64 @isspace(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
%6 = load i8, i8* getelementptr inbounds ([256 x i8], [256 x i8]* @l_next.buff, i64 0, i64 0)
switch i8 %6, label %7 [
i8 34, label %19
i8 40, label %28
i8 41, label %28
]
7: ; preds = %5, %7
%8 = phi i8* [ %10, %7 ], [ getelementptr inbounds ([256 x i8], [256 x i8]* @l_next.buff, i64 0, i64 0), %5 ]
%9 = tail call signext i8 (...) @l_readchar()
%10 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %9, i8* %10
%11 = tail call i64 @isspace(i8 signext %9)
%12 = icmp ne i64 %11, 0
%13 = load i8, i8* %10
%14 = and i8 %13, -2
%15 = icmp eq i8 %14, 40
%16 = select i1 %12, i1 true, i1 %15
br i1 %16, label %17, label %7
17: ; preds = %7
%18 = tail call i32 @l_putback(i8 signext %13)
br label %28
19: ; preds = %5, %23
%20 = phi i8* [ %24, %23 ], [ getelementptr inbounds ([256 x i8], [256 x i8]* @l_next.buff, i64 0, i64 0), %5 ]
%21 = tail call signext i8 (...) @l_readchar()
%22 = getelementptr inbounds i8, i8* %20, i64 1
store i8 %21, i8* %22
switch i8 %21, label %23 [
i8 34, label %28
i8 92, label %25
]
23: ; preds = %19, %25
%24 = phi i8* [ %27, %25 ], [ %22, %19 ]
br label %19
25: ; preds = %19
%26 = tail call signext i8 (...) @l_readchar()
%27 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %26, i8* %27
br label %23
28: ; preds = %19, %5, %5, %17
%29 = phi i8* [ %8, %17 ], [ getelementptr inbounds ([256 x i8], [256 x i8]* @l_next.buff, i64 0, i64 0), %5 ], [ getelementptr inbounds ([256 x i8], [256 x i8]* @l_next.buff, i64 0, i64 0), %5 ], [ %22, %19 ]
%30 = getelementptr inbounds i8, i8* %29, i64 1
store i8 0, i8* %30
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @l_next.buff, i64 0, i64 0)
}