#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*/ printDigit(int);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int value;
  for (value = 1; value < 101; value++) {
    printf("%s\n", ("************" + (value % 10 - 2)));
  }
  printDigit(1998);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x65,-0x8(%rbp)
jge    1177 <main+0x57>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
sub    $0x2,%edx
movslq %edx,%rax
lea    0xeac(%rip),%rsi
add    %rax,%rsi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    $0x7ce,%edi
call   1040 <printDigit@plt>
lea    0xe7a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x64,%r14d
lea    0xebb(%rip),%rbp
mov    $0x1,%ebx
movabs $0xcccccccccccccccd,%r15
cc cc cc
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rax
mul    %r15
shr    $0x2,%rdx
and    $0xfffffffffffffffe,%rdx
lea    (%rdx,%rdx,4),%rax
mov    %rbp,%rdi
sub    %rax,%rdi
call   1040 <puts@plt>
add    $0x1,%rbp
add    $0x1,%rbx
add    $0xffffffff,%r14d
jne    1160 <main+0x30>
mov    $0x7ce,%edi
call   1050 <printDigit@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [13 x i8] c"************\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %13, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 101
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %2
%8 = srem i32 %7, 10
%9 = sub nsw i32 %8, 2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i64 %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %6
%14 = load i32, i32* %2
%15 = add nsw i32 %14, 1
store i32 %15, i32* %2
br label %3
16: ; preds = %3
%17 = call i32 @printDigit(i32 1998)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

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