#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(void) {
  char nombre[5];
  nombre[0] = 'J';
  nombre[1] = 'U';
  nombre[2] = 'A';
  nombre[3] = 'N';
  nombre[4] = '\0';
  printf("%s\n", nombre);
  char nombre2[] = "Ramon Jose Hernandez IV XXX";
  printf("%s\n", nombre2);
  printf("El valor [3] del nombre: %c\n", nombre2[3]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x4a,-0x9(%rbp)
movb   $0x55,-0x8(%rbp)
movb   $0x41,-0x7(%rbp)
movb   $0x4e,-0x6(%rbp)
movb   $0x0,-0x5(%rbp)
lea    -0x9(%rbp),%rsi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0xee4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xee1(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x18(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x2d(%rbp),%esi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movl   $0x4e41554a,0xb(%rsp)
4e
movb   $0x0,0xf(%rsp)
lea    0xb(%rsp),%rdi
call   1030 <puts@plt>
movups 0xeca(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xeb2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
mov    $0x6f,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__const.main.nombre2 = [28 x i8] c"Ramon Jose Hernandez IV XXX\00"
@.str.1 = [29 x i8] c"El valor [3] del nombre: %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca [28 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
store i8 74, i8* %4
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 1
store i8 85, i8* %5
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 2
store i8 65, i8* %6
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 3
store i8 78, i8* %7
%8 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 4
store i8 0, i8* %8
%9 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = bitcast [28 x i8]* %3 to i8*
%12 = getelementptr inbounds [28 x i8], [28 x i8]* %3, i64 0, i64 0
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds [28 x i8], [28 x i8]* %3, i64 0, i64 3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@__const.main.nombre2 = [28 x i8] c"Ramon Jose Hernandez IV XXX\00"
@.str.1 = [29 x i8] c"El valor [3] del nombre: %c\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = alloca [28 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
store i8 74, i8* %3
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 1
store i8 85, i8* %4
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 2
store i8 65, i8* %5
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 3
store i8 78, i8* %6
%7 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 4
store i8 0, i8* %7
%8 = call i32 @puts(i8* %3)
%9 = getelementptr inbounds [28 x i8], [28 x i8]* %2, i64 0, i64 0
%10 = call i32 @puts(i8* %9)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 111)
ret i32 0
}