#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void rglPrintIt(unsigned int v) {
  printf("%02x %02x %02x %02x : ", (v >> 24) & 0xff, (v >> 16) & 0xff,
         (v >> 8) & 0xff, v & 0xff);
  for (unsigned int mask = (0x1 << 31), i = 1; mask != 0; mask >>= 1, i++)
    printf("%d%s", (v & mask) ? 1 : 0, (i % 8 == 0) ? " " : "");
  printf("\n");
}


x86 assembly (clang, -O0):
<rglPrintIt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
shr    $0x18,%esi
and    $0xff,%esi
mov    -0x4(%rbp),%edx
shr    $0x10,%edx
and    $0xff,%edx
mov    -0x4(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
mov    -0x4(%rbp),%r8d
and    $0xff,%r8d
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x80000000,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11c3 <rglPrintIt+0xb3>
mov    -0x4(%rbp),%ecx
and    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    $0x1,%eax
cmp    $0x0,%ecx
cmovne %eax,%esi
mov    -0xc(%rbp),%ecx
and    $0x7,%ecx
lea    0xe8d(%rip),%rdx
lea    0xe7e(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rdx
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1166 <rglPrintIt+0x56>
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rglPrintIt>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%eax
shr    $0x18,%eax
mov    %edi,%ecx
shr    $0x10,%ecx
movzbl %cl,%edx
movzbl %bh,%ecx
mov    %edi,%r13d
movzbl %bl,%r8d
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x80000000,%ebp
mov    $0x1,%ebx
lea    0xeb0(%rip),%r15
lea    0xeaa(%rip),%r12
lea    0xea4(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %esi,%esi
test   %r13d,%ebp
setne  %sil
test   $0x7,%bl
mov    %r12,%rdx
cmove  %r15,%rdx
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
shr    %ebp
add    $0x1,%ebx
cmp    $0x21,%ebx
jne    1180 <rglPrintIt+0x60>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"%02x %02x %02x %02x : \00"
@.str.1 = [5 x i8] c"%d%s\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [2 x i8] c"\0A\00"
define void @rglPrintIt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = lshr i32 %5, 24
%7 = and i32 %6, 255
%8 = load i32, i32* %2
%9 = lshr i32 %8, 16
%10 = and i32 %9, 255
%11 = load i32, i32* %2
%12 = lshr i32 %11, 8
%13 = and i32 %12, 255
%14 = load i32, i32* %2
%15 = and i32 %14, 255
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10, i32 %13, i32 %15)
store i32 -2147483648, i32* %3
store i32 1, i32* %4
br label %17
17: ; preds = %33, %1
%18 = load i32, i32* %3
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %38
20: ; preds = %17
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = and i32 %21, %22
%24 = icmp ne i32 %23, 0
%25 = zext i1 %24 to i64
%26 = select i1 %24, i32 1, i32 0
%27 = load i32, i32* %4
%28 = urem i32 %27, 8
%29 = icmp eq i32 %28, 0
%30 = zext i1 %29 to i64
%31 = select i1 %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %26, i8* %31)
br label %33
33: ; preds = %20
%34 = load i32, i32* %3
%35 = lshr i32 %34, 1
store i32 %35, i32* %3
%36 = load i32, i32* %4
%37 = add i32 %36, 1
store i32 %37, i32* %4
br label %17
38: ; preds = %17
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"%02x %02x %02x %02x : \00"
@.str.1 = [5 x i8] c"%d%s\00"
@.str.2 = [2 x i8] c" \00"
@.str.3 = [1 x i8] zeroinitializer
define void @rglPrintIt(i32 %0) {
%2 = lshr i32 %0, 24
%3 = lshr i32 %0, 16
%4 = and i32 %3, 255
%5 = lshr i32 %0, 8
%6 = and i32 %5, 255
%7 = and i32 %0, 255
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %4, i32 %6, i32 %7)
br label %11
9: ; preds = %11
%10 = tail call i32 @putchar(i32 10)
ret void
11: ; preds = %1, %11
%12 = phi i32 [ 1, %1 ], [ %22, %11 ]
%13 = phi i32 [ -2147483648, %1 ], [ %21, %11 ]
%14 = and i32 %13, %0
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i32
%17 = and i32 %12, 7
%18 = icmp eq i32 %17, 0
%19 = select i1 %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %16, i8* %19)
%21 = lshr i32 %13, 1
%22 = add nuw nsw i32 %12, 1
%23 = icmp eq i32 %22, 33
br i1 %23, label %9, label %11
}