#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
void show_cap(unsigned int cap) {
  char str[80] = "[ ] ";
  str[1] = (cap & 0x00000040) ? 'X' : ' ';
  printf("%sVertical ancillary space\n", str);
  printf("\nPress Enter to continue: ");
  fgets(str, 80, stdin);
  return;
}


x86 assembly (clang, -O0):
<show_cap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x50,%edx
call   1040 <memset@plt>
movb   $0x5b,-0x60(%rbp)
movb   $0x20,-0x5f(%rbp)
movb   $0x5d,-0x5e(%rbp)
movb   $0x20,-0x5d(%rbp)
mov    -0x4(%rbp),%edx
and    $0x40,%edx
mov    $0x20,%eax
mov    $0x58,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,-0x5f(%rbp)
lea    -0x60(%rbp),%rsi
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    0x2e49(%rip),%rax
mov    (%rax),%edx
mov    $0x50,%esi
call   1050 <fgets@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_cap>:
push   %rbx
sub    $0x50,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movb   $0x5b,(%rsp)
movw   $0x205d,0x2(%rsp)
test   $0x40,%dil
mov    $0x20,%eax
mov    $0x58,%ecx
cmove  %eax,%ecx
mov    %cl,0x1(%rsp)
lea    0xe99(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x50,%esi
call   1040 <fgets@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"%sVertical ancillary space\0A\00"
@.str.1 = [27 x i8] c"\0APress Enter to continue: \00"
@stdin = global i32 0
define void @show_cap(i32 %0) {
%2 = alloca i32
%3 = alloca [80 x i8]
store i32 %0, i32* %2
%4 = bitcast [80 x i8]* %3 to i8*
%5 = bitcast i8* %4 to [80 x i8]*
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i32 0, i32 0
store i8 91, i8* %6
%7 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i32 0, i32 1
store i8 32, i8* %7
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i32 0, i32 2
store i8 93, i8* %8
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %5, i32 0, i32 3
store i8 32, i8* %9
%10 = load i32, i32* %2
%11 = and i32 %10, 64
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 88, i32 32
%15 = trunc i32 %14 to i8
%16 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 1
store i8 %15, i8* %16
%17 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%20 = getelementptr inbounds [80 x i8], [80 x i8]* %3, i64 0, i64 0
%21 = load i32, i32* @stdin
%22 = call i32 @fgets(i8* %20, i32 80, i32 %21)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"%sVertical ancillary space\0A\00"
@.str.1 = [27 x i8] c"\0APress Enter to continue: \00"
@stdin = global i32 0
define void @show_cap(i32 %0) {
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
store i8 91, i8* %3
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 1
%5 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 2
store i8 93, i8* %5
%6 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 3
store i8 32, i8* %6
%7 = and i32 %0, 64
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i8 32, i8 88
store i8 %9, i8* %4
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %3)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @stdin
%13 = call i32 @fgets(i8* %3, i32 80, i32 %12)
ret void
}