#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 next();
int rnum();
int /*<<< orphan*/ vocab(char *, int, int);
void rvoc() {
  char *s;
  int index;
  char buf[6];
  for (;;) {
    index = rnum();
    if (index < 0)
      break;
    for (s = buf, *s = 0;; s++)
      if ((*s = next()) == 011 || *s == '\n' || *s == 012 || *s == ' ')
        break;
    if (*s != '\n' && *s != 012)
      while (next() != 012)
        ;
    *s = 0;
    vocab(buf, -2, index);
  }
}


x86 assembly (clang, -O0):
<rvoc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <rnum@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1151 <rvoc+0x21>
jmp    1220 <rvoc+0xf0>
lea    -0x12(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    $0x0,%al
call   1040 <next@plt>
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x9,%eax
je     11a9 <rvoc+0x79>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     11a9 <rvoc+0x79>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     11a9 <rvoc+0x79>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    11ae <rvoc+0x7e>
jmp    11c4 <rvoc+0x94>
jmp    11b3 <rvoc+0x83>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1160 <rvoc+0x30>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1203 <rvoc+0xd3>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1203 <rvoc+0xd3>
jmp    11e9 <rvoc+0xb9>
mov    $0x0,%al
call   1040 <next@plt>
cmp    $0xa,%eax
je     11fe <rvoc+0xce>
jmp    11e9 <rvoc+0xb9>
jmp    1203 <rvoc+0xd3>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x12(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0xfffffffe,%esi
call   1050 <vocab@plt>
jmp    1138 <rvoc+0x8>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rvoc>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1030 <rnum@plt>
test   %eax,%eax
js     11ce <rvoc+0x9e>
mov    %eax,%ebp
lea    0xa(%rsp),%r14
jmp    116f <rvoc+0x3f>
movb   $0x0,(%rbx)
mov    %r14,%rdi
mov    $0xfffffffe,%esi
mov    %ebp,%edx
call   1050 <vocab@plt>
xor    %eax,%eax
call   1030 <rnum@plt>
mov    %eax,%ebp
test   %eax,%eax
js     11ce <rvoc+0x9e>
movb   $0x0,0xa(%rsp)
mov    %r14,%rbx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <next@plt>
mov    %al,(%rbx)
mov    %eax,%ecx
shl    $0x18,%ecx
cmp    $0x9000000,%ecx
je     11b0 <rvoc+0x80>
cmp    $0xa000000,%ecx
je     11b0 <rvoc+0x80>
cmp    $0x20000000,%ecx
je     11b0 <rvoc+0x80>
add    $0x1,%rbx
jmp    1180 <rvoc+0x50>
nopl   0x0(%rax)
cmp    $0xa,%al
je     1150 <rvoc+0x20>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1040 <next@plt>
cmp    $0xa,%eax
jne    11c0 <rvoc+0x90>
jmp    1150 <rvoc+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @rvoc() {
%1 = alloca i8*
%2 = alloca i32
%3 = alloca [6 x i8]
br label %4
4: ; preds = %54, %0
%5 = call i32 (...) @rnum()
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
br label %59
9: ; preds = %4
%10 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
store i8* %10, i8** %1
%11 = load i8*, i8** %1
store i8 0, i8* %11
br label %12
12: ; preds = %35, %9
%13 = call i32 (...) @next()
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %1
store i8 %14, i8* %15
%16 = sext i8 %14 to i32
%17 = icmp eq i32 %16, 9
br i1 %17, label %33, label %18
18: ; preds = %12
%19 = load i8*, i8** %1
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 10
br i1 %22, label %33, label %23
23: ; preds = %18
%24 = load i8*, i8** %1
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 10
br i1 %27, label %33, label %28
28: ; preds = %23
%29 = load i8*, i8** %1
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 32
br i1 %32, label %33, label %34
33: ; preds = %28, %23, %18, %12
br label %38
34: ; preds = %28
br label %35
35: ; preds = %34
%36 = load i8*, i8** %1
%37 = getelementptr inbounds i8, i8* %36, i32 1
store i8* %37, i8** %1
br label %12
38: ; preds = %33
%39 = load i8*, i8** %1
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp ne i32 %41, 10
br i1 %42, label %43, label %54
43: ; preds = %38
%44 = load i8*, i8** %1
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp ne i32 %46, 10
br i1 %47, label %48, label %54
48: ; preds = %43
br label %49
49: ; preds = %52, %48
%50 = call i32 (...) @next()
%51 = icmp ne i32 %50, 10
br i1 %51, label %52, label %53
52: ; preds = %49
br label %49
53: ; preds = %49
br label %54
54: ; preds = %53, %43, %38
%55 = load i8*, i8** %1
store i8 0, i8* %55
%56 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%57 = load i32, i32* %2
%58 = call i32 @vocab(i8* %56, i32 -2, i32 %57)
br label %4
59: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @rvoc() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 (...) @rnum()
%4 = icmp slt i32 %3, 0
br i1 %4, label %24, label %5
5: ; preds = %0, %20
%6 = phi i32 [ %22, %20 ], [ %3, %0 ]
store i8 0, i8* %2
br label %7
7: ; preds = %12, %5
%8 = phi i8* [ %2, %5 ], [ %13, %12 ]
%9 = call i32 (...) @next()
%10 = trunc i32 %9 to i8
store i8 %10, i8* %8
%11 = shl i32 %9, 24
switch i32 %11, label %12 [
i32 150994944, label %14
i32 167772160, label %14
i32 536870912, label %14
]
12: ; preds = %7
%13 = getelementptr inbounds i8, i8* %8, i64 1
br label %7
14: ; preds = %7, %7, %7
%15 = trunc i32 %9 to i8
%16 = icmp eq i8 %15, 10
br i1 %16, label %20, label %17
17: ; preds = %14, %17
%18 = call i32 (...) @next()
%19 = icmp eq i32 %18, 10
br i1 %19, label %20, label %17
20: ; preds = %17, %14
store i8 0, i8* %8
%21 = call i32 @vocab(i8* %2, i32 -2, i32 %6)
%22 = call i32 (...) @rnum()
%23 = icmp slt i32 %22, 0
br i1 %23, label %24, label %5
24: ; preds = %20, %0
ret void
}