#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 getEmailFrom(int);
int getEmailId(int);
int getEmailTo(int);
int isReadable(int);
int /*<<< orphan*/ printf(char const *, int);
void printMail(int msg) {
  int tmp;
  int tmp___0;
  int tmp___1;
  int tmp___2;
  char const *__restrict __cil_tmp6;
  char const *__restrict __cil_tmp7;
  char const *__restrict __cil_tmp8;
  char const *__restrict __cil_tmp9;
  {
    {
      tmp = getEmailId(msg);
      __cil_tmp6 = (char const *__restrict)"ID:\n  %i\n";
      printf(__cil_tmp6, tmp);
      tmp___0 = getEmailFrom(msg);
      __cil_tmp7 = (char const *__restrict)"FROM:\n  %i\n";
      printf(__cil_tmp7, tmp___0);
      tmp___1 = getEmailTo(msg);
      __cil_tmp8 = (char const *__restrict)"TO:\n  %i\n";
      printf(__cil_tmp8, tmp___1);
      tmp___2 = isReadable(msg);
      __cil_tmp9 = (char const *__restrict)"IS_READABLE\n  %i\n";
      printf(__cil_tmp9, tmp___2);
    }
    return;
  }
}


x86 assembly (clang, -O0):
<printMail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <getEmailId@plt>
mov    %eax,-0x8(%rbp)
lea    0xe93(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <getEmailFrom@plt>
mov    %eax,-0xc(%rbp)
lea    0xe7b(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1070 <getEmailTo@plt>
mov    %eax,-0x10(%rbp)
lea    0xe65(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1060 <isReadable@plt>
mov    %eax,-0x14(%rbp)
lea    0xe4d(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMail>:
push   %rbx
mov    %edi,%ebx
call   1050 <getEmailId@plt>
lea    0xea1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1030 <getEmailFrom@plt>
lea    0xe96(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1070 <getEmailTo@plt>
lea    0xe8d(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %ebx,%edi
call   1060 <isReadable@plt>
lea    0xe82(%rip),%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"ID:\0A %i\0A\00"
@.str.1 = [12 x i8] c"FROM:\0A %i\0A\00"
@.str.2 = [10 x i8] c"TO:\0A %i\0A\00"
@.str.3 = [18 x i8] c"IS_READABLE\0A %i\0A\00"
define void @printMail(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i32 %0, i32* %2
%11 = load i32, i32* %2
%12 = call i32 @getEmailId(i32 %11)
store i32 %12, i32* %3
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8** %7
%13 = load i8*, i8** %7
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* %13, i32 %14)
%16 = load i32, i32* %2
%17 = call i32 @getEmailFrom(i32 %16)
store i32 %17, i32* %4
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %8
%18 = load i8*, i8** %8
%19 = load i32, i32* %4
%20 = call i32 @printf(i8* %18, i32 %19)
%21 = load i32, i32* %2
%22 = call i32 @getEmailTo(i32 %21)
store i32 %22, i32* %5
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %9
%23 = load i8*, i8** %9
%24 = load i32, i32* %5
%25 = call i32 @printf(i8* %23, i32 %24)
%26 = load i32, i32* %2
%27 = call i32 @isReadable(i32 %26)
store i32 %27, i32* %6
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8** %10
%28 = load i8*, i8** %10
%29 = load i32, i32* %6
%30 = call i32 @printf(i8* %28, i32 %29)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"ID:\0A %i\0A\00"
@.str.1 = [12 x i8] c"FROM:\0A %i\0A\00"
@.str.2 = [10 x i8] c"TO:\0A %i\0A\00"
@.str.3 = [18 x i8] c"IS_READABLE\0A %i\0A\00"
define void @printMail(i32 %0) {
%2 = tail call i32 @getEmailId(i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @getEmailFrom(i32 %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 @getEmailTo(i32 %0)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = tail call i32 @isReadable(i32 %0)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %8)
ret void
}