int main(void) {
  unsigned long long i, va;
  for (i = 0; i < 4; i++)
    printf("%llx\n", (1ull << (((i)*9) + 12)));
  for (i = 1; i < 64; i++) {
    va = 0xffull << i;
    printf("%lld %llx\n", i, (((va) >> (((1) * 9) + 12)) & ((1 << 9) - 1)));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x4,-0x10(%rbp)
jae    1162 <main+0x52>
imul   $0x9,-0x10(%rbp),%rcx
add    $0xc,%rcx
mov    $0x1,%esi
shl    %cl,%rsi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1127 <main+0x17>
movq   $0x1,-0x10(%rbp)
cmpq   $0x40,-0x10(%rbp)
jae    11b7 <main+0xa7>
mov    -0x10(%rbp),%rcx
mov    $0xff,%eax
shl    %cl,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
shr    $0x15,%rdx
and    $0x1ff,%rdx
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    116a <main+0x5a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xeea(%rip),%rbx
mov    $0x1000,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x200000,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x40000000,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movabs $0x8000000000,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%ebx
lea    0xe98(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    $0xff,%edx
mov    %ebx,%ecx
shl    %cl,%rdx
shr    $0x15,%edx
and    $0x1ff,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x40,%rbx
jne    1170 <main+0x60>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%llx\0A\00"
@.str.1 = [11 x i8] c"%lld %llx\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %4
4: ; preds = %13, %0
%5 = load i64, i64* %2
%6 = icmp ult i64 %5, 4
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i64, i64* %2
%9 = mul i64 %8, 9
%10 = add i64 %9, 12
%11 = shl i64 1, %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %11)
br label %13
13: ; preds = %7
%14 = load i64, i64* %2
%15 = add i64 %14, 1
store i64 %15, i64* %2
br label %4
16: ; preds = %4
store i64 1, i64* %2
br label %17
17: ; preds = %28, %16
%18 = load i64, i64* %2
%19 = icmp ult i64 %18, 64
br i1 %19, label %20, label %31
20: ; preds = %17
%21 = load i64, i64* %2
%22 = shl i64 255, %21
store i64 %22, i64* %3
%23 = load i64, i64* %2
%24 = load i64, i64* %3
%25 = lshr i64 %24, 21
%26 = and i64 %25, 511
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %23, i64 %26)
br label %28
28: ; preds = %20
%29 = load i64, i64* %2
%30 = add i64 %29, 1
store i64 %30, i64* %2
br label %17
31: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%llx\0A\00"
@.str.1 = [11 x i8] c"%lld %llx\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 4096)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 2097152)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 1073741824)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 549755813888)
br label %5
5: ; preds = %0, %5
%6 = phi i64 [ %11, %5 ], [ 1, %0 ]
%7 = shl i64 255, %6
%8 = lshr i64 %7, 21
%9 = and i64 %8, 511
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %6, i64 %9)
%11 = add nuw nsw i64 %6, 1
%12 = icmp eq i64 %11, 64
br i1 %12, label %13, label %5
13: ; preds = %5
ret i32 0
}