#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 *, char);
int /*<<< orphan*/ strreflex(char *, char *);
int main() {
  char str[] = "Escuela Superior de Computo";
  char strr[9999];
  strreflex(strr, str);
  int i = 0;
  while (str[i] != '\0')
    printf("%c", strr[i++]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2740,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xebf(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x2730(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <strreflex@plt>
movl   $0x0,-0x2734(%rbp)
movslq -0x2734(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     11b7 <main+0x97>
mov    -0x2734(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x2734(%rbp)
cltq
lea    0xe77(%rip),%rdi
movsbl -0x2730(%rbp,%rax,1),%esi
ff
call   1030 <printf@plt>
jmp    1176 <main+0x56>
xor    %eax,%eax
add    $0x2740,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x2730,%rsp
movups 0xed9(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xec1(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <strreflex@plt>
cmpb   $0x0,(%rsp)
je     117b <main+0x5b>
xor    %ebx,%ebx
lea    0xebd(%rip),%r14
nop
lea    0x1(%rbx),%r15
movsbl 0x20(%rsp,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
cmpb   $0x0,0x1(%rsp,%rbx,1)
mov    %r15,%rbx
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x2730,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.str = [28 x i8] c"Escuela Superior de Computo\00"
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [28 x i8]
%3 = alloca [9999 x i8]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [28 x i8]* %2 to i8*
%6 = getelementptr inbounds [9999 x i8], [9999 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [28 x i8], [28 x i8]* %2, i64 0, i64 0
%8 = call i32 @strreflex(i8* %6, i8* %7)
store i32 0, i32* %4
br label %9
9: ; preds = %16, %0
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [28 x i8], [28 x i8]* %2, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %23
16: ; preds = %9
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
%19 = sext i32 %17 to i64
%20 = getelementptr inbounds [9999 x i8], [9999 x i8]* %3, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %21)
br label %9
23: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [28 x i8] c"Escuela Superior de Computo\00"
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca [28 x i8]
%2 = alloca [9999 x i8]
%3 = getelementptr inbounds [28 x i8], [28 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [9999 x i8], [9999 x i8]* %2, i64 0, i64 0
%5 = call i32 @strreflex(i8* %4, i8* %3)
%6 = load i8, i8* %3
%7 = icmp eq i8 %6, 0
br i1 %7, label %17, label %8
8: ; preds = %0, %8
%9 = phi i64 [ %10, %8 ], [ 0, %0 ]
%10 = add nuw i64 %9, 1
%11 = getelementptr inbounds [9999 x i8], [9999 x i8]* %2, i64 0, i64 %9
%12 = load i8, i8* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %12)
%14 = getelementptr inbounds [28 x i8], [28 x i8]* %1, i64 0, i64 %10
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %8
17: ; preds = %8, %0
ret i32 0
}