#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef scalar_t__ n;

/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print56(uint64_t n) {
  for (size_t bit = 9; bit <= 64; bit++) {
    char c = ((n) & (1ULL << (64 - (bit)))) ? '1' : '0';
    putchar(c);
    if ((bit + 6) % 7 == 0)
      putchar(' ');
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<print56>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x9,-0x10(%rbp)
cmpq   $0x40,-0x10(%rbp)
ja     119f <print56+0x8f>
movslq -0x4(%rbp),%rdx
mov    $0x40,%ecx
sub    -0x10(%rbp),%rcx
mov    $0x1,%eax
shl    %cl,%rax
and    %rax,%rdx
mov    $0x30,%eax
mov    $0x31,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rax
add    $0x6,%rax
mov    $0x7,%ecx
xor    %edx,%edx
div    %rcx
cmp    $0x0,%rdx
jne    1189 <print56+0x79>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    118e <print56+0x7e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1123 <print56+0x13>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print56>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
movslq %edi,%r14
mov    $0x37,%ebx
mov    $0xf,%r15b
jmp    113a <print56+0x2a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r15b
add    $0xffffffffffffffff,%rbx
jae    1187 <print56+0x77>
movzbl %r15b,%eax
lea    (%rax,%rax,8),%ecx
lea    (%rax,%rcx,4),%ecx
shr    $0x8,%ecx
sub    %cl,%al
shr    %al
add    %cl,%al
shr    $0x2,%al
movzbl %al,%eax
lea    0x0(,%rax,8),%ebp
sub    %eax,%ebp
add    $0xf1,%bpl
bt     %rbx,%r14
mov    $0x31,%edi
adc    $0xffffffff,%edi
call   1030 <putchar@plt>
movzbl %bpl,%eax
add    %ebx,%eax
cmp    $0x37,%al
jne    1130 <print56+0x20>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1130 <print56+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @print56(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i8
store i32 %0, i32* %2
store i64 9, i64* %3
br label %5
5: ; preds = %28, %1
%6 = load i64, i64* %3
%7 = icmp ule i64 %6, 64
br i1 %7, label %8, label %31
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = load i64, i64* %3
%12 = sub i64 64, %11
%13 = shl i64 1, %12
%14 = and i64 %10, %13
%15 = icmp ne i64 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 49, i32 48
%18 = trunc i32 %17 to i8
store i8 %18, i8* %4
%19 = load i8, i8* %4
%20 = call i32 @putchar(i8 signext %19)
%21 = load i64, i64* %3
%22 = add i64 %21, 6
%23 = urem i64 %22, 7
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %8
%26 = call i32 @putchar(i8 signext 32)
br label %27
27: ; preds = %25, %8
br label %28
28: ; preds = %27
%29 = load i64, i64* %3
%30 = add i64 %29, 1
store i64 %30, i64* %3
br label %5
31: ; preds = %5
%32 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @print56(i32 %0) {
%2 = sext i32 %0 to i64
br label %5
3: ; preds = %19
%4 = tail call i32 @putchar(i8 signext 10)
ret void
5: ; preds = %1, %19
%6 = phi i64 [ 9, %1 ], [ %20, %19 ]
%7 = sub nuw nsw i64 64, %6
%8 = shl nuw i64 1, %7
%9 = and i64 %8, %2
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i8 48, i8 49
%12 = tail call i32 @putchar(i8 signext %11)
%13 = trunc i64 %6 to i8
%14 = add i8 %13, 6
%15 = urem i8 %14, 7
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %5
%18 = tail call i32 @putchar(i8 signext 32)
br label %19
19: ; preds = %17, %5
%20 = add nuw nsw i64 %6, 1
%21 = icmp eq i64 %20, 65
br i1 %21, label %3, label %5
}