#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*/ uint32_t;
typedef scalar_t__ n;

/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void print28(uint32_t n) {
  for (size_t bit = 5; bit <= 32; bit++) {
    char c = ((n) & (1UL << (32 - (bit)))) ? '1' : '0';
    putchar(c);
    if ((bit + 3) % 7 == 0)
      putchar(' ');
  }
  putchar('\n');
}


x86 assembly (clang, -O0):
<print28>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x5,-0x10(%rbp)
cmpq   $0x20,-0x10(%rbp)
ja     119f <print28+0x8f>
movslq -0x4(%rbp),%rdx
mov    $0x20,%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    $0x3,%rax
mov    $0x7,%ecx
xor    %edx,%edx
div    %rcx
cmp    $0x0,%rdx
jne    1189 <print28+0x79>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    118e <print28+0x7e>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1123 <print28+0x13>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print28>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
movslq %edi,%r14
mov    $0x1b,%ebx
mov    $0x8,%r15b
jmp    113a <print28+0x2a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r15b
add    $0xffffffffffffffff,%rbx
jae    1187 <print28+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    $0xf8,%bpl
bt     %rbx,%r14
mov    $0x31,%edi
adc    $0xffffffff,%edi
call   1030 <putchar@plt>
movzbl %bpl,%eax
add    %ebx,%eax
cmp    $0x1b,%al
jne    1130 <print28+0x20>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1130 <print28+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @print28(i32 %0) {
%2 = alloca i32
%3 = alloca i64
%4 = alloca i8
store i32 %0, i32* %2
store i64 5, i64* %3
br label %5
5: ; preds = %28, %1
%6 = load i64, i64* %3
%7 = icmp ule i64 %6, 32
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 32, %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, 3
%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 @print28(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 [ 5, %1 ], [ %20, %19 ]
%7 = sub nuw nsw i64 32, %6
%8 = shl nuw nsw 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, 3
%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, 33
br i1 %21, label %3, label %5
}