#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, char *argv[]) {
  char name[4] = {'a', 'b', 'c', 'd'};
  int numbers[4] = {0, name[2]};
  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] = 'Z';
  name[1] = 'e';
  name[2] = 'd';
  name[3] = '\0';
  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);
  char *another = "Zed";
  printf("another: %s\n", another);
  printf("another each: %c %c %c %c\n", another[0], another[1], another[2],
         another[3]);
  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    0xed4(%rip),%eax
mov    %eax,-0x14(%rbp)
lea    -0x30(%rbp),%rcx
movl   $0x0,-0x30(%rbp)
mov    %rcx,%rax
add    $0x4,%rax
movsbl -0x12(%rbp),%edx
mov    %edx,-0x2c(%rbp)
add    $0x4,%rax
add    $0x10,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x48(%rbp),%rcx
movl   $0x0,(%rax)
add    $0x4,%rax
mov    %rax,-0x50(%rbp)
cmp    %rcx,%rax
mov    %rax,-0x40(%rbp)
jne    1158 <main+0x48>
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x24(%rbp),%r8d
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x14(%rbp),%esi
movsbl -0x13(%rbp),%edx
movsbl -0x12(%rbp),%ecx
movsbl -0x11(%rbp),%r8d
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x14(%rbp),%rsi
lea    0xe72(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x30(%rbp)
movl   $0x2,-0x2c(%rbp)
movl   $0x3,-0x28(%rbp)
movl   $0x4,-0x24(%rbp)
movb   $0x5a,-0x14(%rbp)
movb   $0x65,-0x13(%rbp)
movb   $0x64,-0x12(%rbp)
movb   $0x0,-0x11(%rbp)
mov    -0x30(%rbp),%esi
mov    -0x2c(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x24(%rbp),%r8d
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x14(%rbp),%esi
movsbl -0x13(%rbp),%edx
movsbl -0x12(%rbp),%ecx
movsbl -0x11(%rbp),%r8d
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x14(%rbp),%rsi
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf6(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rsi
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rax
movsbl (%rax),%esi
mov    -0x38(%rbp),%rax
movsbl 0x1(%rax),%edx
mov    -0x38(%rbp),%rax
movsbl 0x2(%rax),%ecx
mov    -0x38(%rbp),%rax
movsbl 0x3(%rax),%r8d
lea    0xdca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
movl   $0x64636261,0x4(%rsp)
64
lea    0xed9(%rip),%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x63,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed2(%rip),%r14
mov    %r14,%rdi
mov    $0x61,%esi
mov    $0x62,%edx
mov    $0x63,%ecx
mov    $0x64,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec4(%rip),%rbx
lea    0x4(%rsp),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x64655a,0x4(%rsp)
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0x4(%rsp),%esi
movsbl 0x5(%rsp),%edx
movsbl 0x6(%rsp),%ecx
movsbl 0x7(%rsp),%r8d
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe66(%rip),%rdi
lea    0xe5b(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe5e(%rip),%rdi
mov    $0x5a,%esi
mov    $0x65,%edx
mov    $0x64,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.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 = [4 x i8] c"Zed\00"
@.str.4 = [13 x i8] c"another: %s\0A\00"
@.str.5 = [27 x i8] c"another each: %c %c %c %c\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to [4 x i8]*
%5 = bitcast i32* %3 to i8*
store i32 1684234849, i32* %3
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 2
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 0, i32 99, i32 0, i32 0)
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 1
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 3
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 97, i32 98, i32 99, i32 100)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32* %3)
store i8 90, i8* %5
store i8 101, i8* %8
store i8 100, i8* %6
store i8 0, i8* %9
%12 = 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)
%13 = load i8, i8* %5
%14 = sext i8 %13 to i32
%15 = load i8, i8* %8
%16 = sext i8 %15 to i32
%17 = load i8, i8* %6
%18 = sext i8 %17 to i32
%19 = load i8, i8* %9
%20 = sext i8 %19 to i32
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %16, i32 %18, i32 %20)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32* %3)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i32 90, i32 101, i32 100, i32 0)
ret i32 0
}