int main(int argc, char *argv[]) {
  int num[4] = {'x', 'y', 'a', 'b'};
  char *name[4] = {'x', 'y', 'a', 'b'};
  int numb = 98;
  printf("Test %c %c %c %c\n", num[0], num[1], num[2], num[3]);
  printf("Test charint %d %d %d %d\n", name[0], name[1], name[2], name[3]);
  printf("Test name %s\n", name);
  printf("Char turned into int is %d\n", num);
  printf("Name from int is %c\n", numb);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecd(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x62,-0x44(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x44(%rbp),%esi
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xefa(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xede(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xef2(%rip),%rdi
mov    $0x78,%esi
mov    $0x79,%edx
mov    $0x61,%ecx
mov    $0x62,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x78,%esi
mov    $0x79,%edx
mov    $0x61,%ecx
mov    $0x62,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x62,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.num = [4 x i32] [i32 120, i32 121, i32 97, i32 98]
@__const.main.name = [4 x i8*] [i8* inttoptr (i64 120 to i8*), i8* inttoptr (i64 121 to i8*), i8* inttoptr (i64 97 to i8*), i8* inttoptr (i64 98 to i8*)]
@.str = [18 x i8] c"Test %c %c %c %c\0A\00"
@.str.1 = [26 x i8] c"Test charint %d %d %d %d\0A\00"
@.str.2 = [14 x i8] c"Test name %s\0A\00"
@.str.3 = [28 x i8] c"Char turned into int is %d\0A\00"
@.str.4 = [21 x i8] c"Name from int is %c\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [4 x i32]
%7 = alloca [4 x i8*]
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [4 x i32]* %6 to i8*
%10 = bitcast [4 x i8*]* %7 to i8*
store i32 98, i32* %8
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%12 = load i32, i32* %11
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 1
%14 = load i32, i32* %13
%15 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 2
%16 = load i32, i32* %15
%17 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 3
%18 = load i32, i32* %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %14, i32 %16, i32 %18)
%20 = getelementptr inbounds [4 x i8*], [4 x i8*]* %7, i64 0, i64 0
%21 = load i8*, i8** %20
%22 = getelementptr inbounds [4 x i8*], [4 x i8*]* %7, i64 0, i64 1
%23 = load i8*, i8** %22
%24 = getelementptr inbounds [4 x i8*], [4 x i8*]* %7, i64 0, i64 2
%25 = load i8*, i8** %24
%26 = getelementptr inbounds [4 x i8*], [4 x i8*]* %7, i64 0, i64 3
%27 = load i8*, i8** %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* %21, i8* %23, i8* %25, i8* %27)
%29 = getelementptr inbounds [4 x i8*], [4 x i8*]* %7, i64 0, i64 0
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %29)
%31 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32* %31)
%33 = load i32, i32* %8
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %33)
ret i32 0
}

LLVM IR (-O2):
@__const.main.num = [4 x i32] [i32 120, i32 121, i32 97, i32 98]
@__const.main.name = [4 x i8*] [i8* inttoptr (i64 120 to i8*), i8* inttoptr (i64 121 to i8*), i8* inttoptr (i64 97 to i8*), i8* inttoptr (i64 98 to i8*)]
@.str = [18 x i8] c"Test %c %c %c %c\0A\00"
@.str.1 = [26 x i8] c"Test charint %d %d %d %d\0A\00"
@.str.2 = [14 x i8] c"Test name %s\0A\00"
@.str.3 = [28 x i8] c"Char turned into int is %d\0A\00"
@.str.4 = [21 x i8] c"Name from int is %c\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i32]
%4 = alloca [4 x i8*]
%5 = bitcast [4 x i32]* %3 to i8*
%6 = bitcast [4 x i8*]* %4 to i8*
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 120, i32 121, i32 97, i32 98)
%9 = getelementptr inbounds [4 x i8*], [4 x i8*]* %4, i64 0, i64 0
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i8* inttoptr (i64 120 to i8*), i8* inttoptr (i64 121 to i8*), i8* inttoptr (i64 97 to i8*), i8* inttoptr (i64 98 to i8*))
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %9)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32* %7)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 98)
ret i32 0
}