void squoze11_to_ascii(int squoze, char *ascii) {
  static char table[] = {' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
                         'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
                         'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '$', '.', '%',
                         '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
  int i;
  squoze &= 0177777;
  for (i = 0; i < 3; i++) {
    ascii[2 - i] = table[squoze % 40];
    squoze /= 40;
  }
  ascii[3] = 0;
}


x86 assembly (clang, -O0):
<squoze11_to_ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    116d <squoze11_to_ascii+0x6d>
mov    -0x4(%rbp),%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
movslq %edx,%rcx
lea    0x2ef4(%rip),%rax
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
sub    -0x14(%rbp),%ecx
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
mov    $0x28,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111d <squoze11_to_ascii+0x1d>
mov    -0x10(%rbp),%rax
movb   $0x0,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<squoze11_to_ascii>:
movzwl %di,%ecx
imul   $0xcccd,%ecx,%edx
shr    $0x15,%edx
lea    0x0(,%rdx,8),%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%edi
movzwl %di,%edi
lea    0xede(%rip),%r8
mov    (%rdi,%r8,1),%al
mov    %al,0x2(%rsi)
imul   $0xcccd,%edx,%eax
shr    $0x12,%eax
and    $0xfffffff8,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%edx
movzwl %dx,%eax
mov    (%rax,%r8,1),%al
mov    %al,0x1(%rsi)
shr    $0x6,%ecx
imul   $0xa3e,%ecx,%eax
shr    $0x10,%eax
imul   $0xcd,%eax,%ecx
shr    $0xa,%ecx
and    $0xfffffff8,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movzbl %al,%eax
mov    (%rax,%r8,1),%al
mov    %al,(%rsi)
movb   $0x0,0x3(%rsi)
ret

LLVM IR (-O0):
@squoze11_to_ascii.table = internal global [40 x i8] c" ABCDEFGHIJKLMNOPQRSTUVWXYZ$.%0123456789"
define void @squoze11_to_ascii(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = and i32 %6, 65535
store i32 %7, i32* %3
store i32 0, i32* %5
br label %8
8: ; preds = %24, %2
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 3
br i1 %10, label %11, label %27
11: ; preds = %8
%12 = load i32, i32* %3
%13 = srem i32 %12, 40
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [40 x i8], [40 x i8]* @squoze11_to_ascii.table, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = load i8*, i8** %4
%18 = load i32, i32* %5
%19 = sub nsw i32 2, %18
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %17, i64 %20
store i8 %16, i8* %21
%22 = load i32, i32* %3
%23 = sdiv i32 %22, 40
store i32 %23, i32* %3
br label %24
24: ; preds = %11
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %8
27: ; preds = %8
%28 = load i8*, i8** %4
%29 = getelementptr inbounds i8, i8* %28, i64 3
store i8 0, i8* %29
ret void
}

LLVM IR (-O2):
@squoze11_to_ascii.table = internal unnamed_addr constant [40 x i8] c" ABCDEFGHIJKLMNOPQRSTUVWXYZ$.%0123456789"
define void @squoze11_to_ascii(i32 %0, i8* nocapture writeonly %1) {
%3 = trunc i32 %0 to i16
%4 = urem i16 %3, 40
%5 = zext i16 %4 to i64
%6 = getelementptr inbounds [40 x i8], [40 x i8]* @squoze11_to_ascii.table, i64 0, i64 %5
%7 = load i8, i8* %6
%8 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %7, i8* %8
%9 = trunc i32 %0 to i16
%10 = udiv i16 %9, 40
%11 = urem i16 %10, 40
%12 = zext i16 %11 to i64
%13 = getelementptr inbounds [40 x i8], [40 x i8]* @squoze11_to_ascii.table, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %14, i8* %15
%16 = trunc i32 %0 to i16
%17 = udiv i16 %16, 1600
%18 = trunc i16 %17 to i8
%19 = urem i8 %18, 40
%20 = zext i8 %19 to i64
%21 = getelementptr inbounds [40 x i8], [40 x i8]* @squoze11_to_ascii.table, i64 0, i64 %20
%22 = load i8, i8* %21
store i8 %22, i8* %1
%23 = getelementptr inbounds i8, i8* %1, i64 3
store i8 0, i8* %23
ret void
}