#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 rand();
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  char vetor[26];
  int i;
  srand((unsigned)time(NULL));
  for (i = 0; i < 25; i++) {
    vetor[i] = (rand() % 25) + 65;
  }
  vetor[11] = 'M';
  vetor[12] = 'A';
  vetor[13] = 'G';
  vetor[14] = 'I';
  vetor[15] = 'C';
  vetor[16] = 'A';
  printf("%s", vetor);
}


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)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
movl   $0x0,-0x34(%rbp)
cmpl   $0x19,-0x34(%rbp)
jge    11a1 <main+0x61>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x19,%ecx
cltd
idiv   %ecx
add    $0x41,%edx
mov    %dl,%cl
movslq -0x34(%rbp),%rax
mov    %cl,-0x30(%rbp,%rax,1)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    116d <main+0x2d>
movb   $0x4d,-0x25(%rbp)
movb   $0x41,-0x24(%rbp)
movb   $0x47,-0x23(%rbp)
movb   $0x49,-0x22(%rbp)
movb   $0x43,-0x21(%rbp)
movb   $0x41,-0x20(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xe3c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
add    $0x41,%al
mov    %al,(%rsp,%rbx,1)
add    $0x1,%rbx
cmp    $0x19,%rbx
jne    1160 <main+0x20>
movl   $0x4947414d,0xb(%rsp)
49
movw   $0x4143,0xf(%rsp)
lea    0xe56(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [26 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i64 @time(i32* null)
%9 = trunc i64 %8 to i32
%10 = call i32 @srand(i32 %9)
store i32 0, i32* %7
br label %11
11: ; preds = %22, %2
%12 = load i32, i32* %7
%13 = icmp slt i32 %12, 25
br i1 %13, label %14, label %25
14: ; preds = %11
%15 = call i32 (...) @rand()
%16 = srem i32 %15, 25
%17 = add nsw i32 %16, 65
%18 = trunc i32 %17 to i8
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [26 x i8], [26 x i8]* %6, i64 0, i64 %20
store i8 %18, i8* %21
br label %22
22: ; preds = %14
%23 = load i32, i32* %7
%24 = add nsw i32 %23, 1
store i32 %24, i32* %7
br label %11
25: ; preds = %11
%26 = getelementptr inbounds [26 x i8], [26 x i8]* %6, i64 0, i64 11
store i8 77, i8* %26
%27 = getelementptr inbounds [26 x i8], [26 x i8]* %6, i64 0, i64 12
store i8 65, i8* %27
%28 = getelementptr inbounds [26 x i8], [26 x i8]* %6, i64 0, i64 13
store i8 71, i8* %28
%29 = getelementptr inbounds [26 x i8], [26 x i8]* %6, i64 0, i64 14
store i8 73, i8* %29
%30 = getelementptr inbounds [26 x i8], [26 x i8]* %6, i64 0, i64 15
store i8 67, i8* %30
%31 = getelementptr inbounds [26 x i8], [26 x i8]* %6, i64 0, i64 16
store i8 65, i8* %31
%32 = getelementptr inbounds [26 x i8], [26 x i8]* %6, i64 0, i64 0
%33 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %32)
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [26 x i8]
%4 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 0
%5 = tail call i64 @time(i32* null)
%6 = trunc i64 %5 to i32
%7 = tail call i32 @srand(i32 %6)
br label %8
8: ; preds = %2, %8
%9 = phi i64 [ 0, %2 ], [ %15, %8 ]
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, 25
%12 = trunc i32 %11 to i8
%13 = add nsw i8 %12, 65
%14 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 %9
store i8 %13, i8* %14
%15 = add nuw nsw i64 %9, 1
%16 = icmp eq i64 %15, 25
br i1 %16, label %17, label %8
17: ; preds = %8
%18 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 11
store i8 77, i8* %18
%19 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 12
store i8 65, i8* %19
%20 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 13
store i8 71, i8* %20
%21 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 14
store i8 73, i8* %21
%22 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 15
store i8 67, i8* %22
%23 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 16
store i8 65, i8* %23
%24 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}