#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 */
typedef int /*<<< orphan*/ myName;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, const char *argv[]) {
  char myName[4];
  myName[0] = 'A';
  myName[1] = 'x';
  myName[2] = 'l';
  myName[3] = '\0';
  int myNameAsAnInt;
  printf("The size of an int variable is: %lu bytes\n", sizeof(int));
  printf("The size of a char variable is: %lu byte\n", sizeof(char));
  printf("The size of myName is: %lu bytes\n", sizeof(myName));
  printf("Here is the value of myName: %s\n", myName);
  printf("Here is myName as an ASCII code: %d %d %d %d\n", myName[0], myName[1],
         myName[2], myName[3]);
  myNameAsAnInt =
      ((myName[0] << 24) + (myName[1] << 16) + (myName[2] << 8) + myName[3]);
  printf("This is the first character in myName shifted by 24 (8*3) bits: %d\n",
         (myName[0] << 24));
  printf(
      "This is the second character in myName shifted by 16 (8*2) bits: %d\n",
      (myName[1] << 16));
  printf("This is the third character in myName shifted by 8 bits: %d\n",
         (myName[2] << 8));
  printf("This is the fourth character in myName not shifted a bit: %d\n",
         myName[3]);
  printf("Here is myNme as an int: %d\n", myNameAsAnInt);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x41,-0x14(%rbp)
movb   $0x78,-0x13(%rbp)
movb   $0x6c,-0x12(%rbp)
movb   $0x0,-0x11(%rbp)
lea    0xec3(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x14(%rbp),%rsi
lea    0xefd(%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    0xeff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x14(%rbp),%eax
shl    $0x18,%eax
movsbl -0x13(%rbp),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
movsbl -0x12(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
movsbl -0x11(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
movsbl -0x14(%rbp),%esi
shl    $0x18,%esi
lea    0xef6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x13(%rbp),%esi
shl    $0x10,%esi
lea    0xf25(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x12(%rbp),%esi
shl    $0x8,%esi
lea    0xf55(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%esi
lea    0xf80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xfad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x6c7841,0xc(%rsp)
lea    0xedc(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0xc(%rsp),%esi
movsbl 0xd(%rsp),%edx
movsbl 0xe(%rsp),%ecx
movsbl 0xf(%rsp),%r8d
lea    0xf13(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movzbl 0xc(%rsp),%esi
shl    $0x18,%esi
movsbl 0xd(%rsp),%eax
shl    $0x10,%eax
add    %esi,%eax
movsbl 0xe(%rsp),%ecx
shl    $0x8,%ecx
add    %eax,%ecx
movsbl 0xf(%rsp),%ebx
add    %ecx,%ebx
lea    0xf10(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0xd(%rsp),%esi
shl    $0x10,%esi
lea    0xf3e(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0xe(%rsp),%esi
shl    $0x8,%esi
lea    0xf6d(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0xf(%rsp),%esi
lea    0xf97(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xfc7(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [43 x i8] c"The size of an int variable is: %lu bytes\0A\00"
@.str.1 = [42 x i8] c"The size of a char variable is: %lu byte\0A\00"
@.str.2 = [34 x i8] c"The size of myName is: %lu bytes\0A\00"
@.str.3 = [33 x i8] c"Here is the value of myName: %s\0A\00"
@.str.4 = [46 x i8] c"Here is myName as an ASCII code: %d %d %d %d\0A\00"
@.str.5 = [68 x i8] c"This is the first character in myName shifted by 24 (8*3) bits: %d\0A\00"
@.str.6 = [69 x i8] c"This is the second character in myName shifted by 16 (8*2) bits: %d\0A\00"
@.str.7 = [61 x i8] c"This is the third character in myName shifted by 8 bits: %d\0A\00"
@.str.8 = [62 x i8] c"This is the fourth character in myName not shifted a bit: %d\0A\00"
@.str.9 = [29 x i8] c"Here is myNme as an int: %d\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 i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
store i8 65, i8* %8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 1
store i8 120, i8* %9
%10 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 2
store i8 108, i8* %10
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 3
store i8 0, i8* %11
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i64 4)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i64 1)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i64 4)
%15 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 1
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 2
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 3
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i32 %19, i32 %22, i32 %25, i32 %28)
%30 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = shl i32 %32, 24
%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 = shl i32 %36, 16
%38 = add nsw i32 %33, %37
%39 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 2
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = shl i32 %41, 8
%43 = add nsw i32 %38, %42
%44 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 3
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = add nsw i32 %43, %46
store i32 %47, i32* %7
%48 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = shl i32 %50, 24
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.5, i64 0, i64 0), i32 %51)
%53 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 1
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = shl i32 %55, 16
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0), i32 %56)
%58 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 2
%59 = load i8, i8* %58
%60 = sext i8 %59 to i32
%61 = shl i32 %60, 8
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0), i32 %61)
%63 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 3
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.8, i64 0, i64 0), i32 %65)
%67 = load i32, i32* %7
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i32 %67)
ret i32 0
}

LLVM IR (-O2):
@.str = [43 x i8] c"The size of an int variable is: %lu bytes\0A\00"
@.str.1 = [42 x i8] c"The size of a char variable is: %lu byte\0A\00"
@.str.2 = [34 x i8] c"The size of myName is: %lu bytes\0A\00"
@.str.3 = [33 x i8] c"Here is the value of myName: %s\0A\00"
@.str.4 = [46 x i8] c"Here is myName as an ASCII code: %d %d %d %d\0A\00"
@.str.5 = [68 x i8] c"This is the first character in myName shifted by 24 (8*3) bits: %d\0A\00"
@.str.6 = [69 x i8] c"This is the second character in myName shifted by 16 (8*2) bits: %d\0A\00"
@.str.7 = [61 x i8] c"This is the third character in myName shifted by 8 bits: %d\0A\00"
@.str.8 = [62 x i8] c"This is the fourth character in myName not shifted a bit: %d\0A\00"
@.str.9 = [29 x i8] c"Here is myNme as an int: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
store i8 65, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 1
store i8 120, i8* %5
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 2
store i8 108, i8* %6
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 3
store i8 0, i8* %7
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i64 4)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i64 1)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i64 4)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* %4)
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = load i8, i8* %5
%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 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i32 %13, i32 %15, i32 %17, i32 %19)
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = shl nuw i32 %22, 24
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = shl nsw i32 %25, 16
%27 = add nsw i32 %26, %23
%28 = load i8, i8* %6
%29 = sext i8 %28 to i32
%30 = shl nsw i32 %29, 8
%31 = add nsw i32 %27, %30
%32 = load i8, i8* %7
%33 = sext i8 %32 to i32
%34 = add nsw i32 %31, %33
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.5, i64 0, i64 0), i32 %23)
%36 = load i8, i8* %5
%37 = sext i8 %36 to i32
%38 = shl nsw i32 %37, 16
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0), i32 %38)
%40 = load i8, i8* %6
%41 = sext i8 %40 to i32
%42 = shl nsw i32 %41, 8
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.7, i64 0, i64 0), i32 %42)
%44 = load i8, i8* %7
%45 = sext i8 %44 to i32
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.8, i64 0, i64 0), i32 %45)
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i32 %34)
ret i32 0
}