#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*/ puts(char *);
int main(void) {
  unsigned int contatore = 0;
  while (contatore < 100) {
    printf("%s", "*");
    contatore++;
    if (contatore % 10 == 0) {
      puts("");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jae    1182 <main+0x62>
lea    0xeb9(%rip),%rdi
lea    0xeb5(%rip),%rsi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
cmp    $0x0,%edx
jne    117d <main+0x5d>
lea    0xe8c(%rip),%rdi
call   1030 <puts@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
xor    %ebp,%ebp
mov    $0x1,%r12b
lea    0xecc(%rip),%r14
lea    0xec8(%rip),%r15
jmp    114c <main+0x2c>
nopl   (%rax)
add    $0xffffffff,%ebp
add    $0x1,%r12b
cmp    $0xffffff9c,%ebp
je     1180 <main+0x60>
movzbl %r12b,%eax
imul   $0xcd,%eax,%eax
shr    $0xa,%eax
and    $0xfffffffe,%eax
lea    (%rax,%rax,4),%ebx
neg    %ebx
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
or     $0x1,%bl
cmp    %bpl,%bl
jne    1140 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [2 x i8] c"*\00"
@.str.2 = [1 x i8] zeroinitializer
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %15, %0
%4 = load i32, i32* %2
%5 = icmp ult i32 %4, 100
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = add i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = urem i32 %10, 10
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %6
%14 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
br label %15
15: ; preds = %13, %6
br label %3
16: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [2 x i8] c"*\00"
define i32 @main() {
br label %1
1: ; preds = %0, %10
%2 = phi i32 [ 0, %0 ], [ %4, %10 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = add nuw nsw i32 %2, 1
%5 = trunc i32 %4 to i8
%6 = urem i8 %5, 10
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = tail call i32 @putchar(i32 10)
br label %10
10: ; preds = %8, %1
%11 = icmp eq i32 %4, 100
br i1 %11, label %12, label %1
12: ; preds = %10
ret i32 0
}