#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*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
void main() {
  int i, a, n = 1;
  while (n <= 7) {
    do {
      scanf("%d", &a);
    } while (a < 1 || a > 50);
    for (i = 1; i <= a; i++)
      printf("*");
    printf("\n");
    n++;
  }
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0xc(%rbp)
cmpl   $0x7,-0xc(%rbp)
jg     11c9 <main+0x99>
jmp    114e <main+0x1e>
lea    0xeab(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jl     1177 <main+0x47>
cmpl   $0x32,-0x8(%rbp)
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    114e <main+0x1e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11af <main+0x7f>
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1189 <main+0x59>
lea    0xe4f(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <main+0xf>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%r14
lea    0x4(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffcd,%eax
cmp    $0xffffffce,%eax
jb     1140 <main+0x10>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x4(%rsp),%ebx
jl     1160 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe7c(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffcd,%eax
cmp    $0xffffffce,%eax
jb     1190 <main+0x60>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x4(%rsp),%ebx
jl     11b0 <main+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe2c(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffcd,%eax
cmp    $0xffffffce,%eax
jb     11e0 <main+0xb0>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x4(%rsp),%ebx
jl     1200 <main+0xd0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xddc(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffcd,%eax
cmp    $0xffffffce,%eax
jb     1230 <main+0x100>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x4(%rsp),%ebx
jl     1250 <main+0x120>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd8c(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffcd,%eax
cmp    $0xffffffce,%eax
jb     1280 <main+0x150>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x4(%rsp),%ebx
jl     12a0 <main+0x170>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd3c(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffcd,%eax
cmp    $0xffffffce,%eax
jb     12d0 <main+0x1a0>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x4(%rsp),%ebx
jl     12f0 <main+0x1c0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xcec(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffcd,%eax
cmp    $0xffffffce,%eax
jb     1320 <main+0x1f0>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    0x4(%rsp),%ebx
jl     1340 <main+0x210>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

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