#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 */
scalar_t__ isprint(char);
int /*<<< orphan*/ printf(char *, char, char *);
int /*<<< orphan*/ puts(char *);
int main(void) {
  char c = 'p';
  int x;
  int y;
  int z;
  double d;
  double f;
  char *ptr;
  char s1[100];
  char s2[100];
  int i = 0;
  puts("");
  printf("%c %s", c,
         isprint(c) ? "E' un carattere stampabile"
                    : "Non e' un carattere stampabile");
  puts("");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x70,-0x5(%rbp)
movl   $0x0,-0x114(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <puts@plt>
mov    -0x5(%rbp),%al
mov    %al,-0x115(%rbp)
movsbl -0x5(%rbp),%edi
call   1050 <isprint@plt>
mov    %rax,%rsi
mov    -0x115(%rbp),%al
lea    0xea3(%rip),%rdx
lea    0xe81(%rip),%rcx
cmp    $0x0,%rsi
cmovne %rcx,%rdx
lea    0xe6c(%rip),%rdi
movsbl %al,%esi
call   1040 <printf@plt>
lea    0xe7d(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x70,%edi
call   1050 <isprint@plt>
test   %rax,%rax
lea    0xed2(%rip),%rax
lea    0xeb0(%rip),%rdx
cmove  %rax,%rdx
lea    0xe9f(%rip),%rdi
mov    $0x70,%esi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [6 x i8] c"%c %s\00"
@.str.2 = [27 x i8] c"E' un carattere stampabile\00"
@.str.3 = [31 x i8] c"Non e' un carattere stampabile\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca i8*
%9 = alloca [100 x i8]
%10 = alloca [100 x i8]
%11 = alloca i32
store i32 0, i32* %1
store i8 112, i8* %2
store i32 0, i32* %11
%12 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%13 = load i8, i8* %2
%14 = load i8, i8* %2
%15 = call i64 @isprint(i8 signext %14)
%16 = icmp ne i64 %15, 0
%17 = zext i1 %16 to i64
%18 = select i1 %16, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0)
%19 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8 signext %13, i8* %18)
%20 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [6 x i8] c"%c %s\00"
@.str.2 = [27 x i8] c"E' un carattere stampabile\00"
@.str.3 = [31 x i8] c"Non e' un carattere stampabile\00"
define i32 @main() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i64 @isprint(i8 signext 112)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8 signext 112, i8* %4)
%6 = tail call i32 @putchar(i32 10)
ret i32 0
}