#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 EOF;
int /*<<< orphan*/ lexAppendc(int);
int /*<<< orphan*/ lexClearToken();
int lexLookahead();
int /*<<< orphan*/ lexSkipLookahead();
int /*<<< orphan*/ lexSkipWhite();
char *lexStr();
int /*<<< orphan*/ strchr(char *, int);
char *lexGetWord() {
  int c;
  lexSkipWhite();
  lexClearToken();
  c = lexLookahead();
  while (c != EOF && !strchr("\n;:=", c)) {
    lexAppendc(c);
    lexSkipLookahead();
    c = lexLookahead();
  }
  lexAppendc(0);
  return lexStr();
}


x86 assembly (clang, -O0):
<lexGetWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1070 <lexSkipWhite@plt>
mov    $0x0,%al
call   1050 <lexClearToken@plt>
mov    $0x0,%al
call   1090 <lexLookahead@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
mov    0x2e4c(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     11c1 <lexGetWord+0x51>
mov    -0x4(%rbp),%esi
lea    0xe4f(%rip),%rdi
call   1040 <strchr@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    11d1 <lexGetWord+0x61>
jmp    11ef <lexGetWord+0x7f>
mov    -0x4(%rbp),%edi
call   1080 <lexAppendc@plt>
mov    $0x0,%al
call   1060 <lexSkipLookahead@plt>
mov    $0x0,%al
call   1090 <lexLookahead@plt>
mov    %eax,-0x4(%rbp)
jmp    1190 <lexGetWord+0x20>
xor    %edi,%edi
call   1080 <lexAppendc@plt>
mov    $0x0,%al
call   1030 <lexStr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lexGetWord>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1070 <lexSkipWhite@plt>
xor    %eax,%eax
call   1050 <lexClearToken@plt>
xor    %eax,%eax
call   1090 <lexLookahead@plt>
mov    0x2e58(%rip),%rbx
cmp    (%rbx),%eax
je     11c9 <lexGetWord+0x59>
mov    %eax,%ebp
lea    0xe63(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebp,%esi
call   1040 <strchr@plt>
test   %eax,%eax
jne    11c9 <lexGetWord+0x59>
mov    %ebp,%edi
call   1080 <lexAppendc@plt>
xor    %eax,%eax
call   1060 <lexSkipLookahead@plt>
xor    %eax,%eax
call   1090 <lexLookahead@plt>
mov    %eax,%ebp
cmp    (%rbx),%eax
jne    11a0 <lexGetWord+0x30>
xor    %edi,%edi
call   1080 <lexAppendc@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <lexStr@plt>

LLVM IR (-O0):
@EOF = global i32 0
@.str = [5 x i8] c"\0A;:=\00"
define i8* @lexGetWord() {
%1 = alloca i32
%2 = call i32 (...) @lexSkipWhite()
%3 = call i32 (...) @lexClearToken()
%4 = call i32 (...) @lexLookahead()
store i32 %4, i32* %1
br label %5
5: ; preds = %16, %0
%6 = load i32, i32* %1
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = load i32, i32* %1
%11 = call i32 @strchr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br label %14
14: ; preds = %9, %5
%15 = phi i1 [ false, %5 ], [ %13, %9 ]
br i1 %15, label %16, label %21
16: ; preds = %14
%17 = load i32, i32* %1
%18 = call i32 @lexAppendc(i32 %17)
%19 = call i32 (...) @lexSkipLookahead()
%20 = call i32 (...) @lexLookahead()
store i32 %20, i32* %1
br label %5
21: ; preds = %14
%22 = call i32 @lexAppendc(i32 0)
%23 = call i8* (...) @lexStr()
ret i8* %23
}

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