#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 main(int argc, const char *argv[]) {
  int numbers[4] = {0};
  char name[6] = {'a'};
  printf("numbers: %d %d %d %d\n", numbers[0], numbers[1], numbers[2],
         numbers[3]);
  printf("name each: %c %c %c %c\n", name[0], name[1], name[2], name[3]);
  printf("name: %s\n", name);
  numbers[0] = 1;
  numbers[1] = 2;
  numbers[2] = 3;
  numbers[3] = 4;
  name[0] = 'C';
  name[1] = 'h';
  name[2] = 'r';
  name[3] = 'i';
  name[4] = 's';
  name[5] = '\0';
  printf("numbers: %d %d %d %d\n", numbers[0], numbers[1], numbers[2],
         numbers[3]);
  printf("name each: %c %c %c %c %c %c\n", name[0], name[1], name[2], name[3],
         name[4], name[5]);
  printf("name: %s\n", name);
  char *another = "Chris";
  printf("another: %s\n", another);
  printf("another each: %c %c %c %c %c %c\n", another[0], another[1],
         another[2], another[3], another[4], another[5]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    0xeb4(%rip),%eax
mov    %eax,-0x26(%rbp)
mov    0xeae(%rip),%ax
mov    %ax,-0x22(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x26(%rbp),%esi
movsbl -0x25(%rbp),%edx
movsbl -0x24(%rbp),%ecx
movsbl -0x23(%rbp),%r8d
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x26(%rbp),%rsi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x20(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x3,-0x18(%rbp)
movl   $0x4,-0x14(%rbp)
movb   $0x43,-0x26(%rbp)
movb   $0x68,-0x25(%rbp)
movb   $0x72,-0x24(%rbp)
movb   $0x69,-0x23(%rbp)
movb   $0x73,-0x22(%rbp)
movb   $0x0,-0x21(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x26(%rbp),%esi
movsbl -0x25(%rbp),%edx
movsbl -0x24(%rbp),%ecx
movsbl -0x23(%rbp),%r8d
movsbl -0x22(%rbp),%r9d
movsbl -0x21(%rbp),%eax
lea    0xe28(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x26(%rbp),%rsi
lea    0xe09(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe23(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
movsbl (%rax),%esi
mov    -0x30(%rbp),%rax
movsbl 0x1(%rax),%edx
mov    -0x30(%rbp),%rax
movsbl 0x2(%rax),%ecx
mov    -0x30(%rbp),%rax
movsbl 0x3(%rax),%r8d
mov    -0x30(%rbp),%rax
movsbl 0x4(%rax),%r9d
mov    -0x30(%rbp),%rax
movsbl 0x5(%rax),%eax
lea    0xde8(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movw   $0x0,0xc(%rsp)
movl   $0x61,0x8(%rsp)
lea    0xed7(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x61,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed1(%rip),%r15
lea    0x8(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x69726843,0x8(%rsp)
69
movw   $0x73,0xc(%rsp)
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0x8(%rsp),%esi
movsbl 0x9(%rsp),%edx
movsbl 0xa(%rsp),%ecx
movsbl 0xb(%rsp),%r8d
movsbl 0xc(%rsp),%r9d
movsbl 0xd(%rsp),%eax
mov    %eax,(%rsp)
lea    0xe71(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe7a(%rip),%rdi
lea    0xe6d(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x0,(%rsp)
lea    0xe6b(%rip),%rdi
mov    $0x43,%esi
mov    $0x68,%edx
mov    $0x72,%ecx
mov    $0x69,%r8d
mov    $0x73,%r9d
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.name = [6 x i8] c"a\00\00\00\00\00"
@.str = [22 x i8] c"numbers: %d %d %d %d\0A\00"
@.str.1 = [24 x i8] c"name each: %c %c %c %c\0A\00"
@.str.2 = [10 x i8] c"name: %s\0A\00"
@.str.3 = [30 x i8] c"name each: %c %c %c %c %c %c\0A\00"
@.str.4 = [6 x i8] c"Chris\00"
@.str.5 = [13 x i8] c"another: %s\0A\00"
@.str.6 = [33 x i8] c"another each: %c %c %c %c %c %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 [6 x i8]
%8 = alloca i8*
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 [6 x i8]* %7 to i8*
%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 ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %14, i32 %16, i32 %18)
%20 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 1
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 2
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 3
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %25, i32 %28, i32 %31)
%33 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %33)
%35 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
store i32 1, i32* %35
%36 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 1
store i32 2, i32* %36
%37 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 2
store i32 3, i32* %37
%38 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 3
store i32 4, i32* %38
%39 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
store i8 67, i8* %39
%40 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 1
store i8 104, i8* %40
%41 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 2
store i8 114, i8* %41
%42 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 3
store i8 105, i8* %42
%43 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 4
store i8 115, i8* %43
%44 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 5
store i8 0, i8* %44
%45 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
%46 = load i32, i32* %45
%47 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 1
%48 = load i32, i32* %47
%49 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 2
%50 = load i32, i32* %49
%51 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 3
%52 = load i32, i32* %51
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %46, i32 %48, i32 %50, i32 %52)
%54 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 1
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 2
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 3
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 4
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 5
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 %56, i32 %59, i32 %62, i32 %65, i32 %68, i32 %71)
%73 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %73)
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %8
%75 = load i8*, i8** %8
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* %75)
%77 = load i8*, i8** %8
%78 = getelementptr inbounds i8, i8* %77, i64 0
%79 = load i8, i8* %78
%80 = sext i8 %79 to i32
%81 = load i8*, i8** %8
%82 = getelementptr inbounds i8, i8* %81, i64 1
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
%85 = load i8*, i8** %8
%86 = getelementptr inbounds i8, i8* %85, i64 2
%87 = load i8, i8* %86
%88 = sext i8 %87 to i32
%89 = load i8*, i8** %8
%90 = getelementptr inbounds i8, i8* %89, i64 3
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = load i8*, i8** %8
%94 = getelementptr inbounds i8, i8* %93, i64 4
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = load i8*, i8** %8
%98 = getelementptr inbounds i8, i8* %97, i64 5
%99 = load i8, i8* %98
%100 = sext i8 %99 to i32
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 %80, i32 %84, i32 %88, i32 %92, i32 %96, i32 %100)
ret i32 0
}

LLVM IR (-O2):
@__const.main.name = [6 x i8] c"a\00\00\00\00\00"
@.str = [22 x i8] c"numbers: %d %d %d %d\0A\00"
@.str.1 = [24 x i8] c"name each: %c %c %c %c\0A\00"
@.str.2 = [10 x i8] c"name: %s\0A\00"
@.str.3 = [30 x i8] c"name each: %c %c %c %c %c %c\0A\00"
@.str.4 = [6 x i8] c"Chris\00"
@.str.5 = [13 x i8] c"another: %s\0A\00"
@.str.6 = [33 x i8] c"another each: %c %c %c %c %c %c\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 0, i32 0)
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 1
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 2
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 3
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 97, i32 0, i32 0, i32 0)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %4)
store i8 67, i8* %4
store i8 104, i8* %6
store i8 114, i8* %7
store i8 105, i8* %8
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 4
store i8 115, i8* %11
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 5
store i8 0, i8* %12
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4)
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = load i8, i8* %6
%17 = sext i8 %16 to i32
%18 = load i8, i8* %7
%19 = sext i8 %18 to i32
%20 = load i8, i8* %8
%21 = sext i8 %20 to i32
%22 = load i8, i8* %11
%23 = sext i8 %22 to i32
%24 = load i8, i8* %12
%25 = sext i8 %24 to i32
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i32 %15, i32 %17, i32 %19, i32 %21, i32 %23, i32 %25)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 67, i32 104, i32 114, i32 105, i32 115, i32 0)
ret i32 0
}