#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 number[4] = {0};
  char characters[4] = {'a'};
  printf("Number:\n \t %d \t %d \t %d \t %d \n", number[0], number[1],
         number[2], number[3]);
  printf("Character:\n \t %c \t %c \t %c \t %c \n", characters[0],
         characters[1], characters[2], characters[3]);
  number[0] = 1;
  number[1] = 2;
  number[2] = 3;
  number[3] = 4;
  characters[0] = 'Z';
  characters[1] = 'E';
  characters[2] = 'D';
  characters[3] = '\0';
  printf("Number Modified:\n \t %d \t %d \t %d \t %d \n", number[0], number[1],
         number[2], number[3]);
  printf("Character Modified:\n \t %c \t %c \t %c \t %c \n", characters[0],
         characters[1], characters[2], characters[3]);
  printf("Printing Characters[] like a string, %s \n", characters);
  char *another_way = "ZED";
  printf("Another way via a Pointer, %s \n", another_way);
  printf("Another way, pointer, character wise:\n \t %c \t %c \t %c \t %c \n",
         characters[0], characters[1], characters[2], characters[3]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%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>
movsbl -0x24(%rbp),%esi
movsbl -0x23(%rbp),%edx
movsbl -0x22(%rbp),%ecx
movsbl -0x21(%rbp),%r8d
lea    0xea8(%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   $0x45,-0x23(%rbp)
movb   $0x44,-0x22(%rbp)
movb   $0x0,-0x21(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe83(%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    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x24(%rbp),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xeb6(%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    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x44455a,0x4(%rsp)
lea    0xee0(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x61,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    $0x4,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x5a,%esi
mov    $0x45,%edx
mov    $0x44,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf1b(%rip),%rdi
lea    0xf10(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0x4(%rsp),%esi
movsbl 0x5(%rsp),%edx
movsbl 0x6(%rsp),%ecx
movsbl 0x7(%rsp),%r8d
lea    0xf11(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [31 x i8] c"Number:\0A \09 %d \09 %d \09 %d \09 %d \0A\00"
@.str.1 = [34 x i8] c"Character:\0A \09 %c \09 %c \09 %c \09 %c \0A\00"
@.str.2 = [40 x i8] c"Number Modified:\0A \09 %d \09 %d \09 %d \09 %d \0A\00"
@.str.3 = [43 x i8] c"Character Modified:\0A \09 %c \09 %c \09 %c \09 %c \0A\00"
@.str.4 = [42 x i8] c"Printing Characters[] like a string, %s \0A\00"
@.str.5 = [4 x i8] c"ZED\00"
@.str.6 = [32 x i8] c"Another way via a Pointer, %s \0A\00"
@.str.7 = [61 x i8] c"Another way, pointer, character wise:\0A \09 %c \09 %c \09 %c \09 %c \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to [4 x i8]*
%3 = bitcast i32* %1 to i8*
store i32 4474202, i32* %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 0, i32 0, i32 0, i32 0)
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 97, i32 0, i32 0, i32 0)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 2, i32 3, i32 4)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), i32 90, i32 69, i32 68, i32 0)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = load i8, i8* %5
%16 = sext i8 %15 to i32
%17 = load i8, i8* %6
%18 = sext i8 %17 to i32
%19 = load i8, i8* %7
%20 = sext i8 %19 to i32
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0), i32 %14, i32 %16, i32 %18, i32 %20)
ret i32 0
}