#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 */
char *iscntrl(char);
char *isgraph(char);
char *isprint(char);
char *ispunct(char);
char *isspace(char);
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Joe\tSmith\nis cool!\n");
  printf("\a\n");
  printf("Book\bt\n");
  printf("Adam\rBob\n");
  printf(iscntrl('\n'));
  printf(isprint(' '));
  printf(isgraph(' '));
  printf(ispunct('.'));
  printf(isspace('\t'));
  printf(isspace('q'));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
lea    0xe92(%rip),%rdi
call   1040 <printf@plt>
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <iscntrl@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
mov    $0x20,%edi
call   1070 <isprint@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
mov    $0x20,%edi
call   1080 <isgraph@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
mov    $0x2e,%edi
call   1050 <ispunct@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
mov    $0x9,%edi
call   1060 <isspace@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
mov    $0x71,%edi
call   1060 <isspace@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xe88(%rip),%rdi
call   1030 <puts@plt>
lea    0xe8f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe85(%rip),%rdi
call   1030 <puts@plt>
lea    0xe80(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
call   1040 <iscntrl@plt>
mov    %rax,%rdi
call   1050 <printf@plt>
mov    $0x20,%edi
call   1080 <isprint@plt>
mov    %rax,%rdi
call   1050 <printf@plt>
mov    $0x20,%edi
call   1090 <isgraph@plt>
mov    %rax,%rdi
call   1050 <printf@plt>
mov    $0x2e,%edi
call   1060 <ispunct@plt>
mov    %rax,%rdi
call   1050 <printf@plt>
mov    $0x9,%edi
call   1070 <isspace@plt>
mov    %rax,%rdi
call   1050 <printf@plt>
mov    $0x71,%edi
call   1070 <isspace@plt>
mov    %rax,%rdi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Joe\09Smith\0Ais cool!\0A\00"
@.str.1 = [3 x i8] c"\07\0A\00"
@.str.2 = [8 x i8] c"Book\08t\0A\00"
@.str.3 = [10 x i8] c"Adam\0DBob\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%6 = call i8* @iscntrl(i8 signext 10)
%7 = call i32 @printf(i8* %6)
%8 = call i8* @isprint(i8 signext 32)
%9 = call i32 @printf(i8* %8)
%10 = call i8* @isgraph(i8 signext 32)
%11 = call i32 @printf(i8* %10)
%12 = call i8* @ispunct(i8 signext 46)
%13 = call i32 @printf(i8* %12)
%14 = call i8* @isspace(i8 signext 9)
%15 = call i32 @printf(i8* %14)
%16 = call i8* @isspace(i8 signext 113)
%17 = call i32 @printf(i8* %16)
ret i32 0
}

LLVM IR (-O2):
@str = [19 x i8] c"Joe\09Smith\0Ais cool!\00"
@str.4 = [2 x i8] c"\07\00"
@str.5 = [7 x i8] c"Book\08t\00"
@str.6 = [9 x i8] c"Adam\0DBob\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i8* @iscntrl(i8 signext 10)
%6 = tail call i32 @printf(i8* dereferenceable(1) %5)
%7 = tail call i8* @isprint(i8 signext 32)
%8 = tail call i32 @printf(i8* dereferenceable(1) %7)
%9 = tail call i8* @isgraph(i8 signext 32)
%10 = tail call i32 @printf(i8* dereferenceable(1) %9)
%11 = tail call i8* @ispunct(i8 signext 46)
%12 = tail call i32 @printf(i8* dereferenceable(1) %11)
%13 = tail call i8* @isspace(i8 signext 9)
%14 = tail call i32 @printf(i8* dereferenceable(1) %13)
%15 = tail call i8* @isspace(i8 signext 113)
%16 = tail call i32 @printf(i8* dereferenceable(1) %15)
ret i32 0
}