#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int /*<<< orphan*/ stdout;
void printProgress(short progress) {
  char progressbar[11];
  unsigned short n;
  if (progress < 0) {
    printf("%17s", "");
  } else {
    if (progress < 5)
      sprintf(progressbar, "%c", '\0');
    else if (progress < 10)
      sprintf(progressbar, "%c", '-');
    else if (progress < 15)
      sprintf(progressbar, "%c", '=');
    else if (progress < 20)
      sprintf(progressbar, "%s", "=-");
    else if (progress < 25)
      sprintf(progressbar, "%s", "==");
    else if (progress < 30)
      sprintf(progressbar, "%s", "==-");
    else if (progress < 35)
      sprintf(progressbar, "%s", "===");
    else if (progress < 40)
      sprintf(progressbar, "%s", "===-");
    else if (progress < 45)
      sprintf(progressbar, "%s", "====");
    else if (progress < 50)
      sprintf(progressbar, "%s", "====-");
    else if (progress < 55)
      sprintf(progressbar, "%s", "=====");
    else if (progress < 60)
      sprintf(progressbar, "%s", "=====-");
    else if (progress < 65)
      sprintf(progressbar, "%s", "======");
    else if (progress < 70)
      sprintf(progressbar, "%s", "======-");
    else if (progress < 75)
      sprintf(progressbar, "%s", "=======");
    else if (progress < 80)
      sprintf(progressbar, "%s", "=======-");
    else if (progress < 85)
      sprintf(progressbar, "%s", "========");
    else if (progress < 90)
      sprintf(progressbar, "%s", "========-");
    else if (progress < 95)
      sprintf(progressbar, "%s", "=========");
    else if (progress < 100)
      sprintf(progressbar, "%s", "=========-");
    else
      sprintf(progressbar, "%s", "==========");
    printf("%3hu%% [%-10s]", progress, progressbar);
  }
  for (n = 0; n < 17; n++)
    putchar('\b');
  fflush(stdout);
}


x86 assembly (clang, -O0):
<printProgress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jge    1176 <printProgress+0x36>
lea    0xe9d(%rip),%rdi
lea    0xeab(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1557 <printProgress+0x417>
movswl -0x2(%rbp),%eax
cmp    $0x5,%eax
jge    119c <printProgress+0x5c>
lea    -0xd(%rbp),%rdi
lea    0xe77(%rip),%rsi
xor    %edx,%edx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    1541 <printProgress+0x401>
movswl -0x2(%rbp),%eax
cmp    $0xa,%eax
jge    11c5 <printProgress+0x85>
lea    -0xd(%rbp),%rdi
lea    0xe51(%rip),%rsi
mov    $0x2d,%edx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    153c <printProgress+0x3fc>
movswl -0x2(%rbp),%eax
cmp    $0xf,%eax
jge    11ee <printProgress+0xae>
lea    -0xd(%rbp),%rdi
lea    0xe28(%rip),%rsi
mov    $0x3d,%edx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    1537 <printProgress+0x3f7>
movswl -0x2(%rbp),%eax
cmp    $0x14,%eax
jge    1219 <printProgress+0xd9>
lea    -0xd(%rbp),%rdi
lea    0xe02(%rip),%rsi
lea    0xe06(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    1532 <printProgress+0x3f2>
movswl -0x2(%rbp),%eax
cmp    $0x19,%eax
jge    1244 <printProgress+0x104>
lea    -0xd(%rbp),%rdi
lea    0xdd7(%rip),%rsi
lea    0xde6(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    152d <printProgress+0x3ed>
movswl -0x2(%rbp),%eax
cmp    $0x1e,%eax
jge    126f <printProgress+0x12f>
lea    -0xd(%rbp),%rdi
lea    0xdac(%rip),%rsi
lea    0xdaf(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    1528 <printProgress+0x3e8>
movswl -0x2(%rbp),%eax
cmp    $0x23,%eax
jge    129a <printProgress+0x15a>
lea    -0xd(%rbp),%rdi
lea    0xd81(%rip),%rsi
lea    0xd8f(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    1523 <printProgress+0x3e3>
movswl -0x2(%rbp),%eax
cmp    $0x28,%eax
jge    12c5 <printProgress+0x185>
lea    -0xd(%rbp),%rdi
lea    0xd56(%rip),%rsi
lea    0xd58(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    151e <printProgress+0x3de>
movswl -0x2(%rbp),%eax
cmp    $0x2d,%eax
jge    12f0 <printProgress+0x1b0>
lea    -0xd(%rbp),%rdi
lea    0xd2b(%rip),%rsi
lea    0xd38(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    1519 <printProgress+0x3d9>
movswl -0x2(%rbp),%eax
cmp    $0x32,%eax
jge    131b <printProgress+0x1db>
lea    -0xd(%rbp),%rdi
lea    0xd00(%rip),%rsi
lea    0xd01(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    1514 <printProgress+0x3d4>
movswl -0x2(%rbp),%eax
cmp    $0x37,%eax
jge    1346 <printProgress+0x206>
lea    -0xd(%rbp),%rdi
lea    0xcd5(%rip),%rsi
lea    0xce1(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    150f <printProgress+0x3cf>
movswl -0x2(%rbp),%eax
cmp    $0x3c,%eax
jge    1371 <printProgress+0x231>
lea    -0xd(%rbp),%rdi
lea    0xcaa(%rip),%rsi
lea    0xcaa(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    150a <printProgress+0x3ca>
movswl -0x2(%rbp),%eax
cmp    $0x41,%eax
jge    139c <printProgress+0x25c>
lea    -0xd(%rbp),%rdi
lea    0xc7f(%rip),%rsi
lea    0xc8a(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    1505 <printProgress+0x3c5>
movswl -0x2(%rbp),%eax
cmp    $0x46,%eax
jge    13c7 <printProgress+0x287>
lea    -0xd(%rbp),%rdi
lea    0xc54(%rip),%rsi
lea    0xc53(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    1500 <printProgress+0x3c0>
movswl -0x2(%rbp),%eax
cmp    $0x4b,%eax
jge    13f2 <printProgress+0x2b2>
lea    -0xd(%rbp),%rdi
lea    0xc29(%rip),%rsi
lea    0xc33(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    14fb <printProgress+0x3bb>
movswl -0x2(%rbp),%eax
cmp    $0x50,%eax
jge    141d <printProgress+0x2dd>
lea    -0xd(%rbp),%rdi
lea    0xbfe(%rip),%rsi
lea    0xbfc(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    14f6 <printProgress+0x3b6>
movswl -0x2(%rbp),%eax
cmp    $0x55,%eax
jge    1448 <printProgress+0x308>
lea    -0xd(%rbp),%rdi
lea    0xbd3(%rip),%rsi
lea    0xbdc(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    14f1 <printProgress+0x3b1>
movswl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jge    1473 <printProgress+0x333>
lea    -0xd(%rbp),%rdi
lea    0xba8(%rip),%rsi
lea    0xba5(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    14ec <printProgress+0x3ac>
movswl -0x2(%rbp),%eax
cmp    $0x5f,%eax
jge    149e <printProgress+0x35e>
lea    -0xd(%rbp),%rdi
lea    0xb7d(%rip),%rsi
lea    0xb85(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    14e7 <printProgress+0x3a7>
movswl -0x2(%rbp),%eax
cmp    $0x64,%eax
jge    14c9 <printProgress+0x389>
lea    -0xd(%rbp),%rdi
lea    0xb52(%rip),%rsi
lea    0xb4e(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    14e2 <printProgress+0x3a2>
lea    -0xd(%rbp),%rdi
lea    0xb34(%rip),%rsi
lea    0xb3b(%rip),%rdx
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    14e7 <printProgress+0x3a7>
jmp    14ec <printProgress+0x3ac>
jmp    14f1 <printProgress+0x3b1>
jmp    14f6 <printProgress+0x3b6>
jmp    14fb <printProgress+0x3bb>
jmp    1500 <printProgress+0x3c0>
jmp    1505 <printProgress+0x3c5>
jmp    150a <printProgress+0x3ca>
jmp    150f <printProgress+0x3cf>
jmp    1514 <printProgress+0x3d4>
jmp    1519 <printProgress+0x3d9>
jmp    151e <printProgress+0x3de>
jmp    1523 <printProgress+0x3e3>
jmp    1528 <printProgress+0x3e8>
jmp    152d <printProgress+0x3ed>
jmp    1532 <printProgress+0x3f2>
jmp    1537 <printProgress+0x3f7>
jmp    153c <printProgress+0x3fc>
jmp    1541 <printProgress+0x401>
movswl -0x2(%rbp),%esi
lea    -0xd(%rbp),%rdx
lea    0xad1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movw   $0x0,-0x10(%rbp)
movzwl -0x10(%rbp),%eax
cmp    $0x11,%eax
jge    1585 <printProgress+0x445>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x10(%rbp)
jmp    155d <printProgress+0x41d>
mov    0x2a54(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printProgress>:
sub    $0x18,%rsp
mov    %edi,%esi
test   %si,%si
js     114d <printProgress+0x1d>
cmp    $0x4,%si
ja     1167 <printProgress+0x37>
movw   $0x0,0x8(%rsp)
jmp    12d1 <printProgress+0x1a1>
lea    0xeac(%rip),%rdi
lea    0xeb4(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12e4 <printProgress+0x1b4>
cmp    $0x9,%si
ja     1179 <printProgress+0x49>
movw   $0x2d,0x8(%rsp)
jmp    12d1 <printProgress+0x1a1>
cmp    $0xe,%si
ja     118b <printProgress+0x5b>
movw   $0x3d,0x8(%rsp)
jmp    12d1 <printProgress+0x1a1>
cmp    $0x13,%si
ja     11a2 <printProgress+0x72>
movb   $0x0,0xa(%rsp)
movw   $0x2d3d,0x8(%rsp)
jmp    12d1 <printProgress+0x1a1>
cmp    $0x18,%si
ja     11b9 <printProgress+0x89>
movb   $0x0,0xa(%rsp)
movw   $0x3d3d,0x8(%rsp)
jmp    12d1 <printProgress+0x1a1>
cmp    $0x1d,%si
ja     11cc <printProgress+0x9c>
movl   $0x2d3d3d,0x8(%rsp)
jmp    12d1 <printProgress+0x1a1>
cmp    $0x22,%si
ja     11df <printProgress+0xaf>
movl   $0x3d3d3d,0x8(%rsp)
jmp    12d1 <printProgress+0x1a1>
cmp    $0x27,%si
ja     11f7 <printProgress+0xc7>
movb   $0x0,0xc(%rsp)
movl   $0x2d3d3d3d,0x8(%rsp)
2d
jmp    12d1 <printProgress+0x1a1>
cmp    $0x2c,%si
ja     120f <printProgress+0xdf>
movb   $0x0,0xc(%rsp)
movl   $0x3d3d3d3d,0x8(%rsp)
3d
jmp    12d1 <printProgress+0x1a1>
cmp    $0x31,%si
ja     1229 <printProgress+0xf9>
movw   $0x2d,0xc(%rsp)
movl   $0x3d3d3d3d,0x8(%rsp)
3d
jmp    12d1 <printProgress+0x1a1>
cmp    $0x36,%si
ja     1243 <printProgress+0x113>
movw   $0x3d,0xc(%rsp)
movl   $0x3d3d3d3d,0x8(%rsp)
3d
jmp    12d1 <printProgress+0x1a1>
cmp    $0x3b,%si
ja     125b <printProgress+0x12b>
movl   $0x2d3d3d,0xb(%rsp)
movl   $0x3d3d3d3d,0x8(%rsp)
3d
jmp    12d1 <printProgress+0x1a1>
cmp    $0x40,%si
ja     1273 <printProgress+0x143>
movl   $0x3d3d3d,0xb(%rsp)
movl   $0x3d3d3d3d,0x8(%rsp)
3d
jmp    12d1 <printProgress+0x1a1>
cmp    $0x45,%si
ja     128a <printProgress+0x15a>
movabs $0x2d3d3d3d3d3d3d,%rax
mov    %rax,0x8(%rsp)
jmp    12d1 <printProgress+0x1a1>
cmp    $0x4a,%si
ja     12a1 <printProgress+0x171>
movabs $0x3d3d3d3d3d3d3d,%rax
mov    %rax,0x8(%rsp)
jmp    12d1 <printProgress+0x1a1>
cmp    $0x4f,%si
ja     12b3 <printProgress+0x183>
movabs $0x2d3d3d3d3d3d3d3d,%rax
3d 3d 2d
jmp    12c7 <printProgress+0x197>
movabs $0x3d3d3d3d3d3d3d3d,%rax
3d 3d 3d
cmp    $0x54,%si
ja     13a1 <printProgress+0x271>
mov    %rax,0x8(%rsp)
movb   $0x0,0x10(%rsp)
lea    0xd43(%rip),%rdi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    0x2c4b(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
add    $0x18,%rsp
ret
cmp    $0x59,%si
ja     13b8 <printProgress+0x288>
mov    %rax,0x8(%rsp)
movw   $0x2d,0x10(%rsp)
jmp    12d1 <printProgress+0x1a1>
cmp    $0x5e,%si
ja     13cf <printProgress+0x29f>
mov    %rax,0x8(%rsp)
movw   $0x3d,0x10(%rsp)
jmp    12d1 <printProgress+0x1a1>
cmp    $0x63,%si
ja     13e7 <printProgress+0x2b7>
mov    %rax,0x8(%rsp)
movl   $0x2d3d3d,0xf(%rsp)
jmp    12d1 <printProgress+0x1a1>
mov    %rax,0x8(%rsp)
movl   $0x3d3d3d,0xf(%rsp)
jmp    12d1 <printProgress+0x1a1>

LLVM IR (-O0):
@.str = [5 x i8] c"%17s\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [3 x i8] c"=-\00"
@.str.5 = [3 x i8] c"==\00"
@.str.6 = [4 x i8] c"==-\00"
@.str.7 = [4 x i8] c"===\00"
@.str.8 = [5 x i8] c"===-\00"
@.str.9 = [5 x i8] c"====\00"
@.str.10 = [6 x i8] c"====-\00"
@.str.11 = [6 x i8] c"=====\00"
@.str.12 = [7 x i8] c"=====-\00"
@.str.13 = [7 x i8] c"======\00"
@.str.14 = [8 x i8] c"======-\00"
@.str.15 = [8 x i8] c"=======\00"
@.str.16 = [9 x i8] c"=======-\00"
@.str.17 = [9 x i8] c"========\00"
@.str.18 = [10 x i8] c"========-\00"
@.str.19 = [10 x i8] c"=========\00"
@.str.20 = [11 x i8] c"=========-\00"
@.str.21 = [11 x i8] c"==========\00"
@.str.22 = [15 x i8] c"%3hu%% [%-10s]\00"
@stdout = global i32 0
define void @printProgress(i16 signext %0) {
%2 = alloca i16
%3 = alloca [11 x i8]
%4 = alloca i16
store i16 %0, i16* %2
%5 = load i16, i16* %2
%6 = sext i16 %5 to i32
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
br label %177
10: ; preds = %1
%11 = load i16, i16* %2
%12 = sext i16 %11 to i32
%13 = icmp slt i32 %12, 5
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%16 = call i32 (i8*, i8*, ...) @sprintf(i8* %15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 0)
br label %172
17: ; preds = %10
%18 = load i16, i16* %2
%19 = sext i16 %18 to i32
%20 = icmp slt i32 %19, 10
br i1 %20, label %21, label %24
21: ; preds = %17
%22 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%23 = call i32 (i8*, i8*, ...) @sprintf(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 45)
br label %171
24: ; preds = %17
%25 = load i16, i16* %2
%26 = sext i16 %25 to i32
%27 = icmp slt i32 %26, 15
br i1 %27, label %28, label %31
28: ; preds = %24
%29 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%30 = call i32 (i8*, i8*, ...) @sprintf(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 61)
br label %170
31: ; preds = %24
%32 = load i16, i16* %2
%33 = sext i16 %32 to i32
%34 = icmp slt i32 %33, 20
br i1 %34, label %35, label %38
35: ; preds = %31
%36 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%37 = call i32 (i8*, i8*, ...) @sprintf(i8* %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %169
38: ; preds = %31
%39 = load i16, i16* %2
%40 = sext i16 %39 to i32
%41 = icmp slt i32 %40, 25
br i1 %41, label %42, label %45
42: ; preds = %38
%43 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%44 = call i32 (i8*, i8*, ...) @sprintf(i8* %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %168
45: ; preds = %38
%46 = load i16, i16* %2
%47 = sext i16 %46 to i32
%48 = icmp slt i32 %47, 30
br i1 %48, label %49, label %52
49: ; preds = %45
%50 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%51 = call i32 (i8*, i8*, ...) @sprintf(i8* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
br label %167
52: ; preds = %45
%53 = load i16, i16* %2
%54 = sext i16 %53 to i32
%55 = icmp slt i32 %54, 35
br i1 %55, label %56, label %59
56: ; preds = %52
%57 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%58 = call i32 (i8*, i8*, ...) @sprintf(i8* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
br label %166
59: ; preds = %52
%60 = load i16, i16* %2
%61 = sext i16 %60 to i32
%62 = icmp slt i32 %61, 40
br i1 %62, label %63, label %66
63: ; preds = %59
%64 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%65 = call i32 (i8*, i8*, ...) @sprintf(i8* %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
br label %165
66: ; preds = %59
%67 = load i16, i16* %2
%68 = sext i16 %67 to i32
%69 = icmp slt i32 %68, 45
br i1 %69, label %70, label %73
70: ; preds = %66
%71 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%72 = call i32 (i8*, i8*, ...) @sprintf(i8* %71, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
br label %164
73: ; preds = %66
%74 = load i16, i16* %2
%75 = sext i16 %74 to i32
%76 = icmp slt i32 %75, 50
br i1 %76, label %77, label %80
77: ; preds = %73
%78 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%79 = call i32 (i8*, i8*, ...) @sprintf(i8* %78, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
br label %163
80: ; preds = %73
%81 = load i16, i16* %2
%82 = sext i16 %81 to i32
%83 = icmp slt i32 %82, 55
br i1 %83, label %84, label %87
84: ; preds = %80
%85 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%86 = call i32 (i8*, i8*, ...) @sprintf(i8* %85, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
br label %162
87: ; preds = %80
%88 = load i16, i16* %2
%89 = sext i16 %88 to i32
%90 = icmp slt i32 %89, 60
br i1 %90, label %91, label %94
91: ; preds = %87
%92 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%93 = call i32 (i8*, i8*, ...) @sprintf(i8* %92, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0))
br label %161
94: ; preds = %87
%95 = load i16, i16* %2
%96 = sext i16 %95 to i32
%97 = icmp slt i32 %96, 65
br i1 %97, label %98, label %101
98: ; preds = %94
%99 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%100 = call i32 (i8*, i8*, ...) @sprintf(i8* %99, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
br label %160
101: ; preds = %94
%102 = load i16, i16* %2
%103 = sext i16 %102 to i32
%104 = icmp slt i32 %103, 70
br i1 %104, label %105, label %108
105: ; preds = %101
%106 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%107 = call i32 (i8*, i8*, ...) @sprintf(i8* %106, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.14, i64 0, i64 0))
br label %159
108: ; preds = %101
%109 = load i16, i16* %2
%110 = sext i16 %109 to i32
%111 = icmp slt i32 %110, 75
br i1 %111, label %112, label %115
112: ; preds = %108
%113 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%114 = call i32 (i8*, i8*, ...) @sprintf(i8* %113, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0))
br label %158
115: ; preds = %108
%116 = load i16, i16* %2
%117 = sext i16 %116 to i32
%118 = icmp slt i32 %117, 80
br i1 %118, label %119, label %122
119: ; preds = %115
%120 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%121 = call i32 (i8*, i8*, ...) @sprintf(i8* %120, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
br label %157
122: ; preds = %115
%123 = load i16, i16* %2
%124 = sext i16 %123 to i32
%125 = icmp slt i32 %124, 85
br i1 %125, label %126, label %129
126: ; preds = %122
%127 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%128 = call i32 (i8*, i8*, ...) @sprintf(i8* %127, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.17, i64 0, i64 0))
br label %156
129: ; preds = %122
%130 = load i16, i16* %2
%131 = sext i16 %130 to i32
%132 = icmp slt i32 %131, 90
br i1 %132, label %133, label %136
133: ; preds = %129
%134 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%135 = call i32 (i8*, i8*, ...) @sprintf(i8* %134, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
br label %155
136: ; preds = %129
%137 = load i16, i16* %2
%138 = sext i16 %137 to i32
%139 = icmp slt i32 %138, 95
br i1 %139, label %140, label %143
140: ; preds = %136
%141 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%142 = call i32 (i8*, i8*, ...) @sprintf(i8* %141, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0))
br label %154
143: ; preds = %136
%144 = load i16, i16* %2
%145 = sext i16 %144 to i32
%146 = icmp slt i32 %145, 100
br i1 %146, label %147, label %150
147: ; preds = %143
%148 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%149 = call i32 (i8*, i8*, ...) @sprintf(i8* %148, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.20, i64 0, i64 0))
br label %153
150: ; preds = %143
%151 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%152 = call i32 (i8*, i8*, ...) @sprintf(i8* %151, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.21, i64 0, i64 0))
br label %153
153: ; preds = %150, %147
br label %154
154: ; preds = %153, %140
br label %155
155: ; preds = %154, %133
br label %156
156: ; preds = %155, %126
br label %157
157: ; preds = %156, %119
br label %158
158: ; preds = %157, %112
br label %159
159: ; preds = %158, %105
br label %160
160: ; preds = %159, %98
br label %161
161: ; preds = %160, %91
br label %162
162: ; preds = %161, %84
br label %163
163: ; preds = %162, %77
br label %164
164: ; preds = %163, %70
br label %165
165: ; preds = %164, %63
br label %166
166: ; preds = %165, %56
br label %167
167: ; preds = %166, %49
br label %168
168: ; preds = %167, %42
br label %169
169: ; preds = %168, %35
br label %170
170: ; preds = %169, %28
br label %171
171: ; preds = %170, %21
br label %172
172: ; preds = %171, %14
%173 = load i16, i16* %2
%174 = sext i16 %173 to i32
%175 = getelementptr inbounds [11 x i8], [11 x i8]* %3, i64 0, i64 0
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.22, i64 0, i64 0), i32 %174, i8* %175)
br label %177
177: ; preds = %172, %8
store i16 0, i16* %4
br label %178
178: ; preds = %184, %177
%179 = load i16, i16* %4
%180 = zext i16 %179 to i32
%181 = icmp slt i32 %180, 17
br i1 %181, label %182, label %187
182: ; preds = %178
%183 = call i32 @putchar(i8 signext 8)
br label %184
184: ; preds = %182
%185 = load i16, i16* %4
%186 = add i16 %185, 1
store i16 %186, i16* %4
br label %178
187: ; preds = %178
%188 = load i32, i32* @stdout
%189 = call i32 @fflush(i32 %188)
ret void
}

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