#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 ledVert(int left, int right, int colon) {
  if (left)
    printf("#       ");
  else
    printf("        ");
  if (right)
    printf("#");
  else
    printf(" ");
  if (colon)
    printf("  #  ");
  else
    printf("     ");
}


x86 assembly (clang, -O0):
<ledVert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113c <ledVert+0x2c>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
jmp    1148 <ledVert+0x38>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
je     1163 <ledVert+0x53>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    116f <ledVert+0x5f>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
je     118a <ledVert+0x7a>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
jmp    1196 <ledVert+0x86>
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ledVert>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
test   %edi,%edi
lea    0xed9(%rip),%rax
lea    0xec9(%rip),%rdi
cmove  %rax,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
test   %ebp,%ebp
setne  %al
lea    (%rax,%rax,2),%edi
or     $0x20,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
lea    0xeb1(%rip),%rax
lea    0xeb0(%rip),%rdi
cmove  %rax,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"# \00"
@.str.1 = [9 x i8] c" \00"
@.str.2 = [2 x i8] c"#\00"
@.str.3 = [2 x i8] c" \00"
@.str.4 = [6 x i8] c" # \00"
@.str.5 = [6 x i8] c" \00"
define void @ledVert(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %13
11: ; preds = %3
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %5
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %20
18: ; preds = %13
%19 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %20
20: ; preds = %18, %16
%21 = load i32, i32* %6
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %27
25: ; preds = %20
%26 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %27
27: ; preds = %25, %23
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"# \00"
@.str.1 = [9 x i8] c" \00"
@.str.4 = [6 x i8] c" # \00"
@.str.5 = [6 x i8] c" \00"
define void @ledVert(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0)
%6 = tail call i32 @printf(i8* dereferenceable(1) %5)
%7 = icmp eq i32 %1, 0
%8 = select i1 %7, i32 32, i32 35
%9 = tail call i32 @putchar(i32 %8)
%10 = icmp eq i32 %2, 0
%11 = select i1 %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0)
%12 = tail call i32 @printf(i8* dereferenceable(1) %11)
ret void
}