#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] = {5};
  char name[4] = {'a'};
  printf("numbers: %d %d %d %d\n", numbers[0], numbers[1], numbers[2],
         numbers[3]);
  printf("chars in name: %c %c %c %c\n", name[0], name[1], name[2], name[3]);
  printf("name is: %s\n", name);
  numbers[0] = 1;
  numbers[1] = 2;
  numbers[2] = 3;
  numbers[3] = 4;
  name[0] = 'Z';
  name[1] = 'e';
  name[2] = 'd';
  printf("initialized numbers: %d %d %d %d\n", numbers[0], numbers[1],
         numbers[2], numbers[3]);
  printf("initialized chars: %c %c %c %c\n", name[0], name[1], name[2],
         name[3]);
  printf("initialized name is: %s\n", name);
  char *another = "Zed";
  printf("another name: %s\n", another);
  printf("another chars: %c %c %c %c\n", another[0], another[1], another[2],
         another[3]);
  numbers[1] = 'Z';
  numbers[2] = 'e';
  numbers[3] = 'd';
  printf("assinging chars into numbers: %d %d %d %d\n", numbers[0], numbers[1],
         numbers[2], numbers[3]);
  name[0] = 1;
  name[1] = 2;
  name[2] = 3;
  printf("initialized chars: %c %c %c %c\n", name[0], name[1], name[2],
         name[3]);
  name[0] = 1;
  name[1] = 1;
  name[2] = 1;
  name[3] = 1;
  int x = *(int *)numbers;
  printf("converting from string to int %d.\n", x);
  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)
mov    0xed3(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xece(%rip),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xee3(%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    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x24(%rbp),%rsi
lea    0xef4(%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)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe63(%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    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x24(%rbp),%rsi
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe7f(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xe74(%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    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x5a,-0x1c(%rbp)
movl   $0x65,-0x18(%rbp)
movl   $0x64,-0x14(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r8d
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x1,-0x24(%rbp)
movb   $0x2,-0x23(%rbp)
movb   $0x3,-0x22(%rbp)
movsbl -0x24(%rbp),%esi
movsbl -0x23(%rbp),%edx
movsbl -0x22(%rbp),%ecx
movsbl -0x21(%rbp),%r8d
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x1,-0x24(%rbp)
movb   $0x1,-0x23(%rbp)
movb   $0x1,-0x22(%rbp)
movb   $0x1,-0x21(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%esi
lea    0xe1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x61,0x4(%rsp)
lea    0xf05(%rip),%rdi
mov    $0x5,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
mov    $0x61,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf13(%rip),%rdi
lea    0x4(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movw   $0x655a,0x4(%rsp)
movb   $0x64,0x6(%rsp)
lea    0xea3(%rip),%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    0xe8d(%rip),%r14
mov    %r14,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe9c(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea8(%rip),%rdi
lea    0xe9d(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea5(%rip),%rdi
mov    $0x5a,%esi
mov    $0x65,%edx
mov    $0x64,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea1(%rip),%rdi
mov    $0x1,%esi
mov    $0x5a,%edx
mov    $0x65,%ecx
mov    $0x64,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
movw   $0x201,0x4(%rsp)
movb   $0x3,0x6(%rsp)
movsbl 0x7(%rsp),%r8d
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x1010101,0x4(%rsp)
01
lea    0xe76(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [22 x i8] c"numbers: %d %d %d %d\0A\00"
@.str.1 = [28 x i8] c"chars in name: %c %c %c %c\0A\00"
@.str.2 = [13 x i8] c"name is: %s\0A\00"
@.str.3 = [34 x i8] c"initialized numbers: %d %d %d %d\0A\00"
@.str.4 = [32 x i8] c"initialized chars: %c %c %c %c\0A\00"
@.str.5 = [25 x i8] c"initialized name is: %s\0A\00"
@.str.6 = [4 x i8] c"Zed\00"
@.str.7 = [18 x i8] c"another name: %s\0A\00"
@.str.8 = [28 x i8] c"another chars: %c %c %c %c\0A\00"
@.str.9 = [43 x i8] c"assinging chars into numbers: %d %d %d %d\0A\00"
@.str.10 = [35 x i8] c"converting from string to int %d.\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 5, i32 0, i32 0, i32 0)
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 1
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 2
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 3
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 97, i32 0, i32 0, i32 0)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32* %3)
store i8 90, i8* %5
store i8 101, i8* %7
store i8 100, i8* %8
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, 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* %7
%16 = sext i8 %15 to i32
%17 = load i8, i8* %8
%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 ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %14, i32 %16, i32 %18, i32 %20)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i32* %3)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0), i32 90, i32 101, i32 100, i32 0)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0), i32 1, i32 90, i32 101, i32 100)
store i8 1, i8* %5
store i8 2, i8* %7
store i8 3, i8* %8
%26 = load i8, i8* %9
%27 = sext i8 %26 to i32
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 1, i32 2, i32 3, i32 %27)
store i32 16843009, i32* %3
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.10, i64 0, i64 0), i32 1)
ret i32 0
}