getans(word1, word2, type1, type2) int *word1, *word2, *type1, *type2;
{
  int work, kk;
  char _wrd1[10], _wrd2[10];
  for (;;) {
    inpans(_wrd1, _wrd2);
    *word1 = *word2 = *type1 = *type2 = -1;
    if (_wrd1[(1) - 1] == '!' || _wrd2[(1) - 1] == '!')
      goto L100;
    work = vocab(_wrd1);
    if (work >= 1) {
      *word1 = work % 1000;
      *type1 = work / 1000;
    }
    work = vocab(_wrd2);
    if (work >= 1) {
      *word2 = work % 1000;
      *type2 = work / 1000;
    }
    if (*type1 >= 0)
      break;
    if (_wrd1[(1) - 1] == ' ') {
      kk = 61;
    } else {
    L100:
      kk = 60;
      if (pct(50))
        kk = 61;
      if (pct(33))
        kk = 13;
    }
    rspeak(kk);
  }
}


x86 assembly (clang, -O0):
<getans>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
lea    -0x3a(%rbp),%rdi
lea    -0x44(%rbp),%rsi
mov    $0x0,%al
call   1040 <inpans@plt>
mov    -0x28(%rbp),%rax
movl   $0xffffffff,(%rax)
mov    -0x20(%rbp),%rax
movl   $0xffffffff,(%rax)
mov    -0x18(%rbp),%rax
movl   $0xffffffff,(%rax)
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
movsbl -0x3a(%rbp),%eax
cmp    $0x21,%eax
je     11a9 <getans+0x69>
movsbl -0x44(%rbp),%eax
cmp    $0x21,%eax
jne    11ae <getans+0x6e>
jmp    1256 <getans+0x116>
lea    -0x3a(%rbp),%rdi
mov    $0x0,%al
call   1050 <vocab@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x1,-0x2c(%rbp)
jl     11ea <getans+0xaa>
mov    -0x2c(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
mov    %edx,(%rax)
mov    -0x2c(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
lea    -0x44(%rbp),%rdi
mov    $0x0,%al
call   1050 <vocab@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x1,-0x2c(%rbp)
jl     1226 <getans+0xe6>
mov    -0x2c(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    -0x18(%rbp),%rax
mov    %edx,(%rax)
mov    -0x2c(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
cmpl   $0x0,(%rax)
jl     1238 <getans+0xf8>
jmp    12a9 <getans+0x169>
movsbl -0x3a(%rbp),%eax
cmp    $0x20,%eax
jne    1251 <getans+0x111>
movl   $0x3d,-0x30(%rbp)
jmp    129a <getans+0x15a>
jmp    1256 <getans+0x116>
movl   $0x3c,-0x30(%rbp)
mov    $0x32,%edi
mov    $0x0,%al
call   1060 <pct@plt>
cmp    $0x0,%eax
je     1279 <getans+0x139>
movl   $0x3d,-0x30(%rbp)
mov    $0x21,%edi
mov    $0x0,%al
call   1060 <pct@plt>
cmp    $0x0,%eax
je     1295 <getans+0x155>
movl   $0xd,-0x30(%rbp)
jmp    129a <getans+0x15a>
mov    -0x30(%rbp),%edi
mov    $0x0,%al
call   1030 <rspeak@plt>
jmp    1158 <getans+0x18>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getans>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r12
lea    0xe(%rsp),%rbp
jmp    117a <getans+0x3a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <rspeak@plt>
lea    0x4(%rsp),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <inpans@plt>
movl   $0xffffffff,(%r14)
movl   $0xffffffff,(%rbx)
movl   $0xffffffff,(%r15)
movl   $0xffffffff,(%r12)
ff
cmpb   $0x21,0x4(%rsp)
je     121d <getans+0xdd>
cmpb   $0x21,0xe(%rsp)
je     121d <getans+0xdd>
lea    0x4(%rsp),%rdi
xor    %eax,%eax
call   1050 <vocab@plt>
test   %eax,%eax
jle    11de <getans+0x9e>
mov    %eax,%ecx
imul   $0x10624dd3,%rcx,%rcx
shr    $0x26,%rcx
imul   $0x3e8,%ecx,%edx
sub    %edx,%eax
mov    %eax,(%r12)
mov    %ecx,(%rbx)
mov    %rbp,%rdi
xor    %eax,%eax
call   1050 <vocab@plt>
test   %eax,%eax
jle    1207 <getans+0xc7>
mov    %eax,%ecx
imul   $0x10624dd3,%rcx,%rcx
shr    $0x26,%rcx
imul   $0x3e8,%ecx,%edx
sub    %edx,%eax
mov    %eax,(%r15)
mov    %ecx,(%r14)
cmpl   $0x0,(%rbx)
jns    1255 <getans+0x115>
mov    $0x3d,%r13d
cmpb   $0x20,0x4(%rsp)
je     1170 <getans+0x30>
mov    $0x32,%edi
xor    %eax,%eax
call   1060 <pct@plt>
cmp    $0x1,%eax
mov    $0x3d,%r13d
sbb    $0x0,%r13d
mov    $0x21,%edi
xor    %eax,%eax
call   1060 <pct@plt>
test   %eax,%eax
je     1170 <getans+0x30>
mov    $0xd,%r13d
jmp    1170 <getans+0x30>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @getans(i32* nocapture writeonly %0, i32* nocapture writeonly %1, i32* nocapture %2, i32* nocapture writeonly %3) {
%5 = alloca [10 x i8]
%6 = alloca [10 x i8]
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
br label %9
9: ; preds = %41, %4
%10 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @inpans to i32 (i8*, i8*, ...)*)(i8* %7, i8* %8)
store i32 -1, i32* %3
store i32 -1, i32* %2
store i32 -1, i32* %1
store i32 -1, i32* %0
%11 = load i8, i8* %7
%12 = icmp eq i8 %11, 33
%13 = load i8, i8* %8
%14 = icmp eq i8 %13, 33
%15 = select i1 %12, i1 true, i1 %14
br i1 %15, label %34, label %16
16: ; preds = %9
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @vocab to i32 (i8*, ...)*)(i8* %7)
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = urem i32 %17, 1000
store i32 %20, i32* %0
%21 = udiv i32 %17, 1000
store i32 %21, i32* %2
br label %22
22: ; preds = %19, %16
%23 = call i32 (i8*, ...) bitcast (i32 (...)* @vocab to i32 (i8*, ...)*)(i8* %8)
%24 = icmp sgt i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = urem i32 %23, 1000
store i32 %26, i32* %1
%27 = udiv i32 %23, 1000
store i32 %27, i32* %3
br label %28
28: ; preds = %25, %22
%29 = load i32, i32* %2
%30 = icmp sgt i32 %29, -1
br i1 %30, label %44, label %31
31: ; preds = %28
%32 = load i8, i8* %7
%33 = icmp eq i8 %32, 32
br i1 %33, label %41, label %34
34: ; preds = %31, %9
%35 = call i32 (i32, ...) bitcast (i32 (...)* @pct to i32 (i32, ...)*)(i32 50)
%36 = icmp eq i32 %35, 0
%37 = select i1 %36, i32 60, i32 61
%38 = call i32 (i32, ...) bitcast (i32 (...)* @pct to i32 (i32, ...)*)(i32 33)
%39 = icmp eq i32 %38, 0
%40 = select i1 %39, i32 %37, i32 13
br label %41
41: ; preds = %34, %31
%42 = phi i32 [ 61, %31 ], [ %40, %34 ]
%43 = call i32 (i32, ...) bitcast (i32 (...)* @rspeak to i32 (i32, ...)*)(i32 %42)
br label %9
44: ; preds = %28
ret i32 undef
}