const char *indent(int n) {
  const char *whitespace[] = {
      "\t\t\t\t\t\t\t\t\t\t\t\t",       "\t\t\t\t\t\t\t\t\t\t\t\t ",
      "\t\t\t\t\t\t\t\t\t\t\t\t  ",     "\t\t\t\t\t\t\t\t\t\t\t\t   ",
      "\t\t\t\t\t\t\t\t\t\t\t\t    ",   "\t\t\t\t\t\t\t\t\t\t\t\t     ",
      "\t\t\t\t\t\t\t\t\t\t\t\t      ", "\t\t\t\t\t\t\t\t\t\t\t\t       "};
  return whitespace[n % 8] + 12 - n / 8;
}


x86 assembly (clang, -O0):
<indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
lea    0x2cba(%rip),%rsi
mov    $0x40,%edx
call   1030 <memcpy@plt>
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
mov    -0x50(%rbp,%rax,8),%rax
add    $0xc,%rax
mov    %rax,-0x58(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indent>:
lea    0x7(%rdi),%eax
test   %edi,%edi
cmovns %edi,%eax
mov    %eax,%ecx
and    $0xfffffff8,%ecx
sub    %ecx,%edi
movslq %edi,%rcx
lea    0xf6b(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
sar    $0x3,%eax
neg    %eax
cltq
add    %rcx,%rax
add    $0xc,%rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09\00"
@.str.1 = [14 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.2 = [15 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.3 = [16 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.4 = [17 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.5 = [18 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.6 = [19 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.7 = [20 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@__const.indent.whitespace = [8 x i8*] [i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i32 0, i32 0)]
define i8* @indent(i32 %0) {
%2 = alloca i32
%3 = alloca [8 x i8*]
store i32 %0, i32* %2
%4 = bitcast [8 x i8*]* %3 to i8*
%5 = load i32, i32* %2
%6 = srem i32 %5, 8
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [8 x i8*], [8 x i8*]* %3, i64 0, i64 %7
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i64 12
%11 = load i32, i32* %2
%12 = sdiv i32 %11, 8
%13 = sext i32 %12 to i64
%14 = sub i64 0, %13
%15 = getelementptr inbounds i8, i8* %10, i64 %14
ret i8* %15
}

LLVM IR (-O2):
@.str = [13 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09\00"
@.str.1 = [14 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.2 = [15 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.3 = [16 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.4 = [17 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.5 = [18 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.6 = [19 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@.str.7 = [20 x i8] c"\09\09\09\09\09\09\09\09\09\09\09\09 \00"
@reltable.indent = [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str to i64), i64 ptrtoint ([8 x i32]* @reltable.indent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.1 to i64), i64 ptrtoint ([8 x i32]* @reltable.indent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.2 to i64), i64 ptrtoint ([8 x i32]* @reltable.indent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.3 to i64), i64 ptrtoint ([8 x i32]* @reltable.indent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.4 to i64), i64 ptrtoint ([8 x i32]* @reltable.indent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.5 to i64), i64 ptrtoint ([8 x i32]* @reltable.indent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.6 to i64), i64 ptrtoint ([8 x i32]* @reltable.indent to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.7 to i64), i64 ptrtoint ([8 x i32]* @reltable.indent to i64)) to i32)]
define i8* @indent(i32 %0) {
%2 = srem i32 %0, 8
%3 = sext i32 %2 to i64
%4 = shl i64 %3, 2
%5 = call i8* @llvm.load.relative.i64(i8* bitcast ([8 x i32]* @reltable.indent to i8*), i64 %4)
%6 = getelementptr inbounds i8, i8* %5, i64 12
%7 = sdiv i32 %0, -8
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
ret i8* %9
}