wordout(word) register long int word;
{
  if (word == 0) {
    charout('z');
  } else {
    register int tmp = 0;
    if (word < 0) {
      tmp = 32;
      word = word - (long)(85 * 85 * 85 * 85 * 32);
    }
    if (word < 0) {
      tmp = 64;
      word = word - (long)(85 * 85 * 85 * 85 * 32);
    }
    charout((int)(((word / (long)(85 * 85 * 85 * 85)) + tmp) + '!'));
    word %= (long)(85 * 85 * 85 * 85);
    charout((int)((word / (85 * 85 * 85)) + '!'));
    word %= (85 * 85 * 85);
    charout((int)((word / (85 * 85)) + '!'));
    word %= (85 * 85);
    charout((int)((word / 85) + '!'));
    word %= 85;
    charout((int)((word) + '!'));
  }
}


x86 assembly (clang, -O0):
<wordout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1138 <wordout+0x28>
mov    $0x7a,%edi
mov    $0x0,%al
call   1030 <charout@plt>
jmp    124b <wordout+0x13b>
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    115f <wordout+0x4f>
movl   $0x20,-0x14(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x63909620,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    117f <wordout+0x6f>
movl   $0x40,-0x14(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x63909620,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x31c84b1,%ecx
cqto
idiv   %rcx
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x21,%rax
mov    %eax,%edi
mov    $0x0,%al
call   1030 <charout@plt>
mov    -0x10(%rbp),%rax
mov    $0x31c84b1,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x95eed,%ecx
cqto
idiv   %rcx
add    $0x21,%rax
mov    %eax,%edi
mov    $0x0,%al
call   1030 <charout@plt>
mov    -0x10(%rbp),%rax
mov    $0x95eed,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x1c39,%ecx
cqto
idiv   %rcx
add    $0x21,%rax
mov    %eax,%edi
mov    $0x0,%al
call   1030 <charout@plt>
mov    -0x10(%rbp),%rax
mov    $0x1c39,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x55,%ecx
cqto
idiv   %rcx
add    $0x21,%rax
mov    %eax,%edi
mov    $0x0,%al
call   1030 <charout@plt>
mov    -0x10(%rbp),%rax
mov    $0x55,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x21,%rax
mov    %eax,%edi
mov    $0x0,%al
call   1030 <charout@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wordout>:
test   %rdi,%rdi
je     122a <wordout+0x11a>
push   %r15
push   %r14
push   %rbx
lea    -0x63909620(%rdi),%rax
test   %rdi,%rdi
cmovns %rdi,%rax
shr    $0x3a,%rdi
and    $0xffffffe0,%edi
lea    -0x63909620(%rax),%r14
test   %rax,%rax
cmovns %rax,%r14
mov    $0x40,%ecx
cmovns %edi,%ecx
movabs $0x5247305f24d2ba2d,%rdx
30 47 52
mov    %r14,%rax
imul   %rdx
mov    %rdx,%rbx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x18,%rbx
add    %rax,%rbx
lea    (%rbx,%rcx,1),%edi
add    $0x21,%edi
xor    %eax,%eax
call   1030 <charout@plt>
imul   $0x31c84b1,%rbx,%rax
sub    %rax,%r14
movslq %r14d,%r14
imul   $0x6d468c3f,%r14,%rbx
mov    %rbx,%r15
shr    $0x3f,%r15
shr    $0x20,%rbx
sar    $0x12,%ebx
lea    (%rbx,%r15,1),%edi
add    $0x21,%edi
xor    %eax,%eax
call   1030 <charout@plt>
add    %r15d,%ebx
imul   $0x95eed,%ebx,%eax
sub    %eax,%r14d
movslq %r14d,%r14
imul   $0xffffffff9121b243,%r14,%rbx
shr    $0x20,%rbx
add    %r14d,%ebx
mov    %ebx,%r15d
shr    $0x1f,%r15d
sar    $0xc,%ebx
lea    (%rbx,%r15,1),%edi
add    $0x21,%edi
xor    %eax,%eax
call   1030 <charout@plt>
add    %r15d,%ebx
imul   $0x1c39,%ebx,%eax
sub    %eax,%r14d
movswl %r14w,%eax
imul   $0x6061,%eax,%ebx
mov    %ebx,%r15d
shr    $0x1f,%r15d
sar    $0x15,%ebx
lea    (%rbx,%r15,1),%eax
add    $0x21,%eax
movswl %ax,%edi
xor    %eax,%eax
call   1030 <charout@plt>
add    %r15d,%ebx
imul   $0x55,%ebx,%eax
sub    %eax,%r14d
add    $0x21,%r14d
movswl %r14w,%edi
pop    %rbx
pop    %r14
pop    %r15
xor    %eax,%eax
jmp    1030 <charout@plt>
mov    $0x7a,%edi
xor    %eax,%eax
jmp    1030 <charout@plt>

LLVM IR (-O0):
define i32 @wordout(i64 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (i32, ...) bitcast (i32 (...)* @charout to i32 (i32, ...)*)(i32 122)
br label %57
9: ; preds = %1
store i32 0, i32* %4
%10 = load i64, i64* %3
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %9
store i32 32, i32* %4
%13 = load i64, i64* %3
%14 = sub nsw i64 %13, 1670420000
store i64 %14, i64* %3
br label %15
15: ; preds = %12, %9
%16 = load i64, i64* %3
%17 = icmp slt i64 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %15
store i32 64, i32* %4
%19 = load i64, i64* %3
%20 = sub nsw i64 %19, 1670420000
store i64 %20, i64* %3
br label %21
21: ; preds = %18, %15
%22 = load i64, i64* %3
%23 = sdiv i64 %22, 52200625
%24 = load i32, i32* %4
%25 = sext i32 %24 to i64
%26 = add nsw i64 %23, %25
%27 = add nsw i64 %26, 33
%28 = trunc i64 %27 to i32
%29 = call i32 (i32, ...) bitcast (i32 (...)* @charout to i32 (i32, ...)*)(i32 %28)
%30 = load i64, i64* %3
%31 = srem i64 %30, 52200625
store i64 %31, i64* %3
%32 = load i64, i64* %3
%33 = sdiv i64 %32, 614125
%34 = add nsw i64 %33, 33
%35 = trunc i64 %34 to i32
%36 = call i32 (i32, ...) bitcast (i32 (...)* @charout to i32 (i32, ...)*)(i32 %35)
%37 = load i64, i64* %3
%38 = srem i64 %37, 614125
store i64 %38, i64* %3
%39 = load i64, i64* %3
%40 = sdiv i64 %39, 7225
%41 = add nsw i64 %40, 33
%42 = trunc i64 %41 to i32
%43 = call i32 (i32, ...) bitcast (i32 (...)* @charout to i32 (i32, ...)*)(i32 %42)
%44 = load i64, i64* %3
%45 = srem i64 %44, 7225
store i64 %45, i64* %3
%46 = load i64, i64* %3
%47 = sdiv i64 %46, 85
%48 = add nsw i64 %47, 33
%49 = trunc i64 %48 to i32
%50 = call i32 (i32, ...) bitcast (i32 (...)* @charout to i32 (i32, ...)*)(i32 %49)
%51 = load i64, i64* %3
%52 = srem i64 %51, 85
store i64 %52, i64* %3
%53 = load i64, i64* %3
%54 = add nsw i64 %53, 33
%55 = trunc i64 %54 to i32
%56 = call i32 (i32, ...) bitcast (i32 (...)* @charout to i32 (i32, ...)*)(i32 %55)
br label %57
57: ; preds = %21, %7
%58 = load i32, i32* %2
ret i32 %58
}

LLVM IR (-O2):
define i32 @wordout(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %36, label %3
3: ; preds = %1
%4 = icmp slt i64 %0, 0
%5 = add nsw i64 %0, -1670420000
%6 = select i1 %4, i64 %5, i64 %0
%7 = lshr i64 %0, 58
%8 = and i64 %7, 32
%9 = icmp slt i64 %6, 0
%10 = add nsw i64 %6, -1670420000
%11 = select i1 %9, i64 %10, i64 %6
%12 = select i1 %9, i64 64, i64 %8
%13 = sdiv i64 %11, 52200625
%14 = add nsw i64 %13, %12
%15 = trunc i64 %14 to i32
%16 = add i32 %15, 33
%17 = tail call i32 (i32, ...) bitcast (i32 (...)* @charout to i32 (i32, ...)*)(i32 %16)
%18 = srem i64 %11, 52200625
%19 = trunc i64 %18 to i32
%20 = sdiv i32 %19, 614125
%21 = add nsw i32 %20, 33
%22 = tail call i32 (i32, ...) bitcast (i32 (...)* @charout to i32 (i32, ...)*)(i32 %21)
%23 = srem i32 %19, 614125
%24 = sdiv i32 %23, 7225
%25 = add nsw i32 %24, 33
%26 = tail call i32 (i32, ...) bitcast (i32 (...)* @charout to i32 (i32, ...)*)(i32 %25)
%27 = srem i32 %23, 7225
%28 = trunc i32 %27 to i16
%29 = sdiv i16 %28, 85
%30 = add nsw i16 %29, 33
%31 = sext i16 %30 to i32
%32 = tail call i32 (i32, ...) bitcast (i32 (...)* @charout to i32 (i32, ...)*)(i32 %31)
%33 = srem i16 %28, 85
%34 = add nsw i16 %33, 33
%35 = sext i16 %34 to i32
br label %36
36: ; preds = %1, %3
%37 = phi i32 [ %35, %3 ], [ 122, %1 ]
%38 = tail call i32 (i32, ...) bitcast (i32 (...)* @charout to i32 (i32, ...)*)(i32 %37)
ret i32 undef
}