#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 strlen(char *);
void main() {
  char nome[50] = "jessica cristina cacau patricio", *ptr;
  int i;
  ptr = nome;
  for (i = 0; i < strlen(nome); i++) {
    printf("%c", *ptr);
    ptr++;
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x40(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x32,%edx
call   1050 <memcpy@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    %eax,-0x50(%rbp)
lea    -0x40(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%eax
cmp    %ecx,%eax
jge    11a7 <main+0x77>
mov    -0x48(%rbp),%rax
movsbl (%rax),%esi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    115c <main+0x2c>
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
movaps 0xef2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0x0,0x30(%rsp)
mov    %rsp,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1189 <main+0x69>
xor    %ebx,%ebx
mov    %rsp,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rsp,%rbx,1),%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
add    $0x1,%rbx
cmp    %eax,%ebx
jl     1170 <main+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.nome = [50 x i8] c"jessica cristina cacau patricio\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [3 x i8] c"%c\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca [50 x i8]
%2 = alloca i8*
%3 = alloca i32
%4 = bitcast [50 x i8]* %1 to i8*
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
store i8* %5, i8** %2
store i32 0, i32* %3
br label %6
6: ; preds = %18, %0
%7 = load i32, i32* %3
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
%10 = icmp slt i32 %7, %9
br i1 %10, label %11, label %21
11: ; preds = %6
%12 = load i8*, i8** %2
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %18
18: ; preds = %11
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %6
21: ; preds = %6
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.main.nome = [50 x i8] c"jessica cristina cacau patricio\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define void @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = call i32 @strlen(i8* %2)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %0, %5
%6 = phi i32 [ %12, %5 ], [ 0, %0 ]
%7 = phi i8* [ %11, %5 ], [ %2, %0 ]
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = call i32 @putchar(i32 %9)
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = add nuw nsw i32 %6, 1
%13 = call i32 @strlen(i8* %2)
%14 = icmp slt i32 %12, %13
br i1 %14, label %5, label %15
15: ; preds = %5, %0
%16 = call i32 @putchar(i32 10)
ret void
}