#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 /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  char caracter, *string[50];
  int loops, i;
  printf("quantos loops-\n");
  scanf("%d", &loops);
  for (i = 0; i < loops; i++) {
    string[i] = "c";
  }
  for (i = 0; i < loops; i++) {
    printf("%c\n", *string[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0x1b4(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x1b8(%rbp)
mov    -0x1b8(%rbp),%eax
cmp    -0x1b4(%rbp),%eax
jge    11a0 <main+0x80>
movslq -0x1b8(%rbp),%rax
lea    0xe8f(%rip),%rcx
mov    %rcx,-0x1b0(%rbp,%rax,8)
ff
mov    -0x1b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b8(%rbp)
jmp    1164 <main+0x44>
movl   $0x0,-0x1b8(%rbp)
mov    -0x1b8(%rbp),%eax
cmp    -0x1b4(%rbp),%eax
jge    11f0 <main+0xd0>
movslq -0x1b8(%rbp),%rax
mov    -0x1b0(%rbp,%rax,8),%rax
ff
movsbl (%rax),%esi
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b8(%rbp)
jmp    11aa <main+0x8a>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x1a8,%rsp
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb3(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
jle    12c0 <main+0x190>
cmp    $0x4,%eax
jae    116f <main+0x3f>
xor    %ecx,%ecx
jmp    1279 <main+0x149>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x1c,%rdi
jae    1195 <main+0x65>
xor    %edi,%edi
jmp    1239 <main+0x109>
and    $0xfffffffffffffff8,%rsi
xor    %edi,%edi
lea    0xe61(%rip),%rbx
movq   %rbx,%xmm0
pshufd $0x44,%xmm0,%xmm0
nopl   0x0(%rax)
movdqa %xmm0,0x10(%rsp,%rdi,8)
movdqa %xmm0,0x20(%rsp,%rdi,8)
movdqa %xmm0,0x30(%rsp,%rdi,8)
movdqa %xmm0,0x40(%rsp,%rdi,8)
movdqa %xmm0,0x50(%rsp,%rdi,8)
movdqa %xmm0,0x60(%rsp,%rdi,8)
movdqa %xmm0,0x70(%rsp,%rdi,8)
movdqa %xmm0,0x80(%rsp,%rdi,8)
movdqa %xmm0,0x90(%rsp,%rdi,8)
movdqa %xmm0,0xa0(%rsp,%rdi,8)
movdqa %xmm0,0xb0(%rsp,%rdi,8)
movdqa %xmm0,0xc0(%rsp,%rdi,8)
movdqa %xmm0,0xd0(%rsp,%rdi,8)
movdqa %xmm0,0xe0(%rsp,%rdi,8)
movdqa %xmm0,0xf0(%rsp,%rdi,8)
movdqa %xmm0,0x100(%rsp,%rdi,8)
add    $0x20,%rdi
add    $0xfffffffffffffff8,%rsi
jne    11b0 <main+0x80>
test   %rdx,%rdx
je     1274 <main+0x144>
lea    (%rsp,%rdi,8),%rsi
add    $0x20,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
lea    0xdb0(%rip),%rbx
movq   %rbx,%xmm0
pshufd $0x44,%xmm0,%xmm0
nopl   (%rax)
movdqa %xmm0,-0x10(%rsi,%rdi,1)
movdqa %xmm0,(%rsi,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1260 <main+0x130>
cmp    %rax,%rcx
je     128e <main+0x15e>
lea    0xd83(%rip),%rdx
mov    %rdx,0x10(%rsp,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1280 <main+0x150>
test   %eax,%eax
jle    12c0 <main+0x190>
lea    0xd6c(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x10(%rsp,%rbx,8),%rax
movsbl (%rax),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jl     12a0 <main+0x170>
xor    %eax,%eax
add    $0x1a8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [16 x i8] c"quantos loops-\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [2 x i8] c"c\00"
@.str.3 = [4 x i8] c"%c\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca [50 x i8*]
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %8)
store i32 0, i32* %9
br label %12
12: ; preds = %20, %2
%13 = load i32, i32* %9
%14 = load i32, i32* %8
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %23
16: ; preds = %12
%17 = load i32, i32* %9
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [50 x i8*], [50 x i8*]* %7, i64 0, i64 %18
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %19
br label %20
20: ; preds = %16
%21 = load i32, i32* %9
%22 = add nsw i32 %21, 1
store i32 %22, i32* %9
br label %12
23: ; preds = %12
store i32 0, i32* %9
br label %24
24: ; preds = %36, %23
%25 = load i32, i32* %9
%26 = load i32, i32* %8
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %39
28: ; preds = %24
%29 = load i32, i32* %9
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [50 x i8*], [50 x i8*]* %7, i64 0, i64 %30
%32 = load i8*, i8** %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %34)
br label %36
36: ; preds = %28
%37 = load i32, i32* %9
%38 = add nsw i32 %37, 1
store i32 %38, i32* %9
br label %24
39: ; preds = %24
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [2 x i8] c"c\00"
@.str.3 = [4 x i8] c"%c\0A\00"
@str = [15 x i8] c"quantos loops-\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [50 x i8*]
%4 = alloca i32
%5 = bitcast [50 x i8*]* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %4
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %102
11: ; preds = %2
%12 = zext i32 %9 to i64
%13 = icmp ult i32 %9, 4
br i1 %13, label %83, label %14
14: ; preds = %11
%15 = and i64 %12, 4294967292
%16 = add nsw i64 %15, -4
%17 = lshr exact i64 %16, 2
%18 = add nuw nsw i64 %17, 1
%19 = and i64 %18, 7
%20 = icmp ult i64 %16, 28
br i1 %20, label %68, label %21
21: ; preds = %14
%22 = and i64 %18, 9223372036854775800
br label %23
23: ; preds = %23, %21
%24 = phi i64 [ 0, %21 ], [ %65, %23 ]
%25 = phi i64 [ 0, %21 ], [ %66, %23 ]
%26 = getelementptr inbounds [50 x i8*], [50 x i8*]* %3, i64 0, i64 %24
%27 = bitcast i8** %26 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %27
%28 = getelementptr inbounds i8*, i8** %26, i64 2
%29 = bitcast i8** %28 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %29
%30 = or i64 %24, 4
%31 = getelementptr inbounds [50 x i8*], [50 x i8*]* %3, i64 0, i64 %30
%32 = bitcast i8** %31 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %32
%33 = getelementptr inbounds i8*, i8** %31, i64 2
%34 = bitcast i8** %33 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %34
%35 = or i64 %24, 8
%36 = getelementptr inbounds [50 x i8*], [50 x i8*]* %3, i64 0, i64 %35
%37 = bitcast i8** %36 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %37
%38 = getelementptr inbounds i8*, i8** %36, i64 2
%39 = bitcast i8** %38 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %39
%40 = or i64 %24, 12
%41 = getelementptr inbounds [50 x i8*], [50 x i8*]* %3, i64 0, i64 %40
%42 = bitcast i8** %41 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %42
%43 = getelementptr inbounds i8*, i8** %41, i64 2
%44 = bitcast i8** %43 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %44
%45 = or i64 %24, 16
%46 = getelementptr inbounds [50 x i8*], [50 x i8*]* %3, i64 0, i64 %45
%47 = bitcast i8** %46 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %47
%48 = getelementptr inbounds i8*, i8** %46, i64 2
%49 = bitcast i8** %48 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %49
%50 = or i64 %24, 20
%51 = getelementptr inbounds [50 x i8*], [50 x i8*]* %3, i64 0, i64 %50
%52 = bitcast i8** %51 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %52
%53 = getelementptr inbounds i8*, i8** %51, i64 2
%54 = bitcast i8** %53 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %54
%55 = or i64 %24, 24
%56 = getelementptr inbounds [50 x i8*], [50 x i8*]* %3, i64 0, i64 %55
%57 = bitcast i8** %56 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %57
%58 = getelementptr inbounds i8*, i8** %56, i64 2
%59 = bitcast i8** %58 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %59
%60 = or i64 %24, 28
%61 = getelementptr inbounds [50 x i8*], [50 x i8*]* %3, i64 0, i64 %60
%62 = bitcast i8** %61 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %62
%63 = getelementptr inbounds i8*, i8** %61, i64 2
%64 = bitcast i8** %63 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %64
%65 = add nuw i64 %24, 32
%66 = add i64 %25, 8
%67 = icmp eq i64 %66, %22
br i1 %67, label %68, label %23
68: ; preds = %23, %14
%69 = phi i64 [ 0, %14 ], [ %65, %23 ]
%70 = icmp eq i64 %19, 0
br i1 %70, label %81, label %71
71: ; preds = %68, %71
%72 = phi i64 [ %78, %71 ], [ %69, %68 ]
%73 = phi i64 [ %79, %71 ], [ 0, %68 ]
%74 = getelementptr inbounds [50 x i8*], [50 x i8*]* %3, i64 0, i64 %72
%75 = bitcast i8** %74 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %75
%76 = getelementptr inbounds i8*, i8** %74, i64 2
%77 = bitcast i8** %76 to <2 x i8*>*
store <2 x i8*> <i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0)>, <2 x i8*>* %77
%78 = add nuw i64 %72, 4
%79 = add i64 %73, 1
%80 = icmp eq i64 %79, %19
br i1 %80, label %81, label %71
81: ; preds = %71, %68
%82 = icmp eq i64 %15, %12
br i1 %82, label %85, label %83
83: ; preds = %11, %81
%84 = phi i64 [ 0, %11 ], [ %15, %81 ]
br label %86
85: ; preds = %86, %81
br i1 %10, label %91, label %102
86: ; preds = %83, %86
%87 = phi i64 [ %89, %86 ], [ %84, %83 ]
%88 = getelementptr inbounds [50 x i8*], [50 x i8*]* %3, i64 0, i64 %87
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %88
%89 = add nuw nsw i64 %87, 1
%90 = icmp eq i64 %89, %12
br i1 %90, label %85, label %86
91: ; preds = %85, %91
%92 = phi i64 [ %98, %91 ], [ 0, %85 ]
%93 = getelementptr inbounds [50 x i8*], [50 x i8*]* %3, i64 0, i64 %92
%94 = load i8*, i8** %93
%95 = load i8, i8* %94
%96 = sext i8 %95 to i32
%97 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %96)
%98 = add nuw nsw i64 %92, 1
%99 = load i32, i32* %4
%100 = sext i32 %99 to i64
%101 = icmp slt i64 %98, %100
br i1 %101, label %91, label %102
102: ; preds = %91, %2, %85
ret i32 0
}