analyze(word, type, value) char *word;
int *type, *value;
{
  int wordval, msg;
  if ((wordval = vocab(word, 0)) == -1) {
    switch (rand() % 3) {
    case 0:
      msg = 60;
      break;
    case 1:
      msg = 61;
      break;
    default:
      msg = 13;
    }
    rspeak(msg);
    return (0);
  }
  *type = wordval / 1000;
  *value = wordval % 1000;
  return (1);
}


x86 assembly (clang, -O0):
<analyze>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <vocab@plt>
mov    %eax,-0x24(%rbp)
cmp    $0xffffffff,%eax
jne    11d6 <analyze+0xa6>
xor    %eax,%eax
call   1050 <rand@plt>
movslq %eax,%rcx
imul   $0x55555556,%rcx,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rdx
add    %ecx,%edx
mov    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
mov    %eax,-0x2c(%rbp)
je     11a1 <analyze+0x71>
jmp    1190 <analyze+0x60>
mov    -0x2c(%rbp),%eax
sub    $0x1,%eax
je     11ad <analyze+0x7d>
jmp    11b9 <analyze+0x89>
movl   $0x3c,-0x28(%rbp)
jmp    11c0 <analyze+0x90>
movl   $0x3d,-0x28(%rbp)
jmp    11c0 <analyze+0x90>
movl   $0xd,-0x28(%rbp)
mov    -0x28(%rbp),%edi
mov    $0x0,%al
call   1030 <rspeak@plt>
movl   $0x0,-0x4(%rbp)
jmp    1201 <analyze+0xd1>
mov    -0x24(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%rax
mov    %edx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<analyze>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
xor    %ebx,%ebx
xor    %esi,%esi
xor    %eax,%eax
call   1040 <vocab@plt>
cmp    $0xffffffff,%eax
je     1177 <analyze+0x47>
movslq %eax,%rcx
imul   $0x10624dd3,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
mov    %ecx,(%r15)
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,(%r14)
mov    $0x1,%ebx
jmp    11bc <analyze+0x8c>
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,2),%ecx
mov    %eax,%edx
sub    %ecx,%edx
cmp    $0x1,%edx
mov    $0x3d,%edx
mov    $0xd,%esi
cmove  %edx,%esi
cmp    %ecx,%eax
mov    $0x3c,%edi
cmovne %esi,%edi
xor    %eax,%eax
call   1030 <rspeak@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @analyze(i8* %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
%10 = load i8*, i8** %5
%11 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @vocab to i32 (i8*, i32, ...)*)(i8* %10, i32 0)
store i32 %11, i32* %8
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %22
13: ; preds = %3
%14 = call i32 (...) @rand()
%15 = srem i32 %14, 3
switch i32 %15, label %18 [
i32 0, label %16
i32 1, label %17
]
16: ; preds = %13
store i32 60, i32* %9
br label %19
17: ; preds = %13
store i32 61, i32* %9
br label %19
18: ; preds = %13
store i32 13, i32* %9
br label %19
19: ; preds = %18, %17, %16
%20 = load i32, i32* %9
%21 = call i32 (i32, ...) bitcast (i32 (...)* @rspeak to i32 (i32, ...)*)(i32 %20)
store i32 0, i32* %4
br label %29
22: ; preds = %3
%23 = load i32, i32* %8
%24 = sdiv i32 %23, 1000
%25 = load i32*, i32** %6
store i32 %24, i32* %25
%26 = load i32, i32* %8
%27 = srem i32 %26, 1000
%28 = load i32*, i32** %7
store i32 %27, i32* %28
store i32 1, i32* %4
br label %29
29: ; preds = %22, %19
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
define i32 @analyze(i8* %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @vocab to i32 (i8*, i32, ...)*)(i8* %0, i32 0)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = tail call i32 (...) @rand()
%8 = srem i32 %7, 3
%9 = icmp eq i32 %8, 1
%10 = select i1 %9, i32 61, i32 13
%11 = icmp eq i32 %8, 0
%12 = select i1 %11, i32 60, i32 %10
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @rspeak to i32 (i32, ...)*)(i32 %12)
br label %17
14: ; preds = %3
%15 = sdiv i32 %4, 1000
store i32 %15, i32* %1
%16 = srem i32 %4, 1000
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %6
%18 = phi i32 [ 0, %6 ], [ 1, %14 ]
ret i32 %18
}