#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[]) {
  int numbers[4] = {0};
  char name[4] = {'a'};
  printf("numbers: %d %d %d %d\n", numbers[0], numbers[1], numbers[2],
         numbers[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: %c %c %c %c\n", name[0], name[1], name[2], name[3]);
  printf("name string: %s\n", name);
  char *another = "Zed";
  printf("another: %s\n", another);
  printf("name: %c %c %c %c\n", another[0], another[1], another[2], another[3]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
mov    0xebb(%rip),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x24(%rbp),%rsi
lea    0xeac(%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   $0x5a,-0x24(%rbp)
movb   $0x65,-0x23(%rbp)
movb   $0x64,-0x22(%rbp)
movb   $0x0,-0x21(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x24(%rbp),%esi
movsbl -0x23(%rbp),%edx
movsbl -0x22(%rbp),%ecx
movsbl -0x21(%rbp),%r8d
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x24(%rbp),%rsi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe54(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xe49(%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
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x61,0x4(%rsp)
lea    0xedd(%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    0xed9(%rip),%rdi
lea    0x4(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x64655a,0x4(%rsp)
mov    %rbx,%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
lea    0xe91(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe93(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe97(%rip),%rdi
lea    0xe8c(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%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    %r14
ret

LLVM IR (-O0):
@__const.main.name = [4 x i8] c"a\00\00\00"
@.str = [22 x i8] c"numbers: %d %d %d %d\0A\00"
@.str.1 = [10 x i8] c"Name: %s\0A\00"
@.str.2 = [19 x i8] c"name: %c %c %c %c\0A\00"
@.str.3 = [17 x i8] c"name string: %s\0A\00"
@.str.4 = [4 x i8] c"Zed\00"
@.str.5 = [13 x i8] c"another: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [4 x i32]
%6 = alloca [4 x i8]
%7 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
%8 = bitcast [4 x i32]* %5 to i8*
%9 = bitcast [4 x i8]* %6 to i8*
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%11 = load i32, i32* %10
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 1
%13 = load i32, i32* %12
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 2
%15 = load i32, i32* %14
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 3
%17 = load i32, i32* %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %13, i32 %15, i32 %17)
%19 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %19)
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
store i32 1, i32* %21
%22 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 1
store i32 2, i32* %22
%23 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 2
store i32 3, i32* %23
%24 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 3
store i32 4, i32* %24
%25 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
store i8 90, i8* %25
%26 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 1
store i8 101, i8* %26
%27 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 2
store i8 100, i8* %27
%28 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 3
store i8 0, i8* %28
%29 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%30 = load i32, i32* %29
%31 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 1
%32 = load i32, i32* %31
%33 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 2
%34 = load i32, i32* %33
%35 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 3
%36 = load i32, i32* %35
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %30, i32 %32, i32 %34, i32 %36)
%38 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 1
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 2
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 3
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %40, i32 %43, i32 %46, i32 %49)
%51 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), i8* %51)
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %7
%53 = load i8*, i8** %7
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* %53)
%55 = load i8*, i8** %7
%56 = getelementptr inbounds i8, i8* %55, i64 0
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = load i8*, i8** %7
%60 = getelementptr inbounds i8, i8* %59, i64 1
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = load i8*, i8** %7
%64 = getelementptr inbounds i8, i8* %63, i64 2
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = load i8*, i8** %7
%68 = getelementptr inbounds i8, i8* %67, i64 3
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %58, i32 %62, i32 %66, i32 %70)
ret i32 0
}

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