#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*/ putchar(char);
void putppt(int c) {
  int i;
  (void)putchar('|');
  for (i = 7; i >= 0; i--) {
    if (i == 2)
      (void)putchar('.');
    if ((c & (1 << i)) != 0)
      (void)putchar('o');
    else
      (void)putchar(' ');
  }
  (void)putchar('|');
  (void)putchar('\n');
}


x86 assembly (clang, -O0):
<putppt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x7c,%edi
call   1030 <putchar@plt>
movl   $0x7,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1190 <putppt+0x80>
cmpl   $0x2,-0x8(%rbp)
jne    114a <putppt+0x3a>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1173 <putppt+0x63>
mov    $0x6f,%edi
call   1030 <putchar@plt>
jmp    117d <putppt+0x6d>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1182 <putppt+0x72>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    112c <putppt+0x1c>
mov    $0x7c,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putppt>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0x7c,%edi
call   1030 <putchar@plt>
movd   %ebx,%xmm0
pshufd $0x0,%xmm0,%xmm0
movdqa 0xecf(%rip),%xmm1
pand   %xmm0,%xmm1
pand   0xed3(%rip),%xmm0
pxor   %xmm2,%xmm2
pcmpeqd %xmm2,%xmm0
pcmpeqd %xmm2,%xmm1
packssdw %xmm0,%xmm1
packsswb %xmm1,%xmm1
pmovmskb %xmm1,%ebp
test   $0x80,%bpl
mov    $0x20,%ebx
mov    $0x6f,%r14d
mov    $0x6f,%edi
cmovne %ebx,%edi
call   1030 <putchar@plt>
test   $0x40,%bpl
mov    $0x6f,%edi
cmovne %ebx,%edi
call   1030 <putchar@plt>
test   $0x20,%bpl
mov    $0x6f,%edi
cmovne %ebx,%edi
call   1030 <putchar@plt>
test   $0x10,%bpl
mov    $0x6f,%edi
cmovne %ebx,%edi
call   1030 <putchar@plt>
test   $0x8,%bpl
mov    $0x6f,%edi
cmovne %ebx,%edi
call   1030 <putchar@plt>
mov    $0x2e,%edi
call   1030 <putchar@plt>
test   $0x4,%bpl
mov    $0x6f,%edi
cmovne %ebx,%edi
call   1030 <putchar@plt>
test   $0x2,%bpl
mov    $0x6f,%edi
cmovne %ebx,%edi
call   1030 <putchar@plt>
test   $0x1,%bpl
cmovne %ebx,%r14d
mov    %r14d,%edi
call   1030 <putchar@plt>
mov    $0x7c,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @putppt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @putchar(i8 signext 124)
store i32 7, i32* %3
br label %5
5: ; preds = %24, %1
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %27
8: ; preds = %5
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 2
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @putchar(i8 signext 46)
br label %13
13: ; preds = %11, %8
%14 = load i32, i32* %2
%15 = load i32, i32* %3
%16 = shl i32 1, %15
%17 = and i32 %14, %16
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %13
%20 = call i32 @putchar(i8 signext 111)
br label %23
21: ; preds = %13
%22 = call i32 @putchar(i8 signext 32)
br label %23
23: ; preds = %21, %19
br label %24
24: ; preds = %23
%25 = load i32, i32* %3
%26 = add nsw i32 %25, -1
store i32 %26, i32* %3
br label %5
27: ; preds = %5
%28 = call i32 @putchar(i8 signext 124)
%29 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @putppt(i32 %0) {
%2 = tail call i32 @putchar(i8 signext 124)
%3 = insertelement <8 x i32> poison, i32 %0, i64 0
%4 = shufflevector <8 x i32> %3, <8 x i32> poison, <8 x i32> zeroinitializer
%5 = and <8 x i32> %4, <i32 1, i32 2, i32 4, i32 8, i32 16, i32 32, i32 64, i32 128>
%6 = icmp eq <8 x i32> %5, zeroinitializer
%7 = extractelement <8 x i1> %6, i64 7
%8 = select i1 %7, i8 32, i8 111
%9 = tail call i32 @putchar(i8 signext %8)
%10 = extractelement <8 x i1> %6, i64 6
%11 = select i1 %10, i8 32, i8 111
%12 = tail call i32 @putchar(i8 signext %11)
%13 = extractelement <8 x i1> %6, i64 5
%14 = select i1 %13, i8 32, i8 111
%15 = tail call i32 @putchar(i8 signext %14)
%16 = extractelement <8 x i1> %6, i64 4
%17 = select i1 %16, i8 32, i8 111
%18 = tail call i32 @putchar(i8 signext %17)
%19 = extractelement <8 x i1> %6, i64 3
%20 = select i1 %19, i8 32, i8 111
%21 = tail call i32 @putchar(i8 signext %20)
%22 = tail call i32 @putchar(i8 signext 46)
%23 = extractelement <8 x i1> %6, i64 2
%24 = select i1 %23, i8 32, i8 111
%25 = tail call i32 @putchar(i8 signext %24)
%26 = extractelement <8 x i1> %6, i64 1
%27 = select i1 %26, i8 32, i8 111
%28 = tail call i32 @putchar(i8 signext %27)
%29 = extractelement <8 x i1> %6, i64 0
%30 = select i1 %29, i8 32, i8 111
%31 = tail call i32 @putchar(i8 signext %30)
%32 = tail call i32 @putchar(i8 signext 124)
%33 = tail call i32 @putchar(i8 signext 10)
ret void
}