#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 *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  int age = 21;
  char name[] = "Ewa Nowara";
  printf("%s is %d years old\n", "Ewa Nowara", 21);
  printf("%s is %d years old\n", name, age);
  strcpy(name, "bob");
  printf("%s \n", name);
  age = 55;
  printf("%d\n", age);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x15,-0x8(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x13(%rbp)
mov    0xec0(%rip),%ax
mov    %ax,-0xb(%rbp)
mov    0xeb8(%rip),%al
mov    %al,-0x9(%rbp)
lea    0xeaf(%rip),%rdi
lea    0xe9d(%rip),%rsi
mov    $0x15,%edx
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x13(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x13(%rbp),%rdi
lea    0xe90(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x13(%rbp),%rsi
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x37,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movabs $0x61776f4e20617745,%rax
6f 77 61
mov    %rax,0x8(%rsp)
movl   $0x617261,0xf(%rsp)
lea    0xecf(%rip),%rsi
lea    0xeb4(%rip),%r14
mov    %r14,%rdi
mov    $0x15,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x15,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xe9b(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe8f(%rip),%rdi
mov    $0x37,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.name = [11 x i8] c"Ewa Nowara\00"
@.str = [20 x i8] c"%s is %d years old\0A\00"
@.str.1 = [11 x i8] c"Ewa Nowara\00"
@.str.2 = [4 x i8] c"bob\00"
@.str.3 = [5 x i8] c"%s \0A\00"
@.str.4 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [11 x i8]
store i32 0, i32* %1
store i32 21, i32* %2
%4 = bitcast [11 x i8]* %3 to i8*
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 21)
%6 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
%9 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%10 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%11 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %11)
store i32 55, i32* %2
%13 = load i32, i32* %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"%s is %d years old\0A\00"
@.str.1 = [11 x i8] c"Ewa Nowara\00"
@.str.2 = [4 x i8] c"bob\00"
@.str.3 = [5 x i8] c"%s \0A\00"
@.str.4 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 21)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %2, i32 21)
%5 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 55)
ret i32 0
}