#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 *, ...);
void gauge_print(int i, int cnt) {
  int gauge;
  gauge = (double)(i / cnt);
  if (gauge <= 1) {
    printf("*****                                               ");
  } else if (gauge == 2) {
    printf("**********                                          ");
  } else if (gauge == 3) {
    printf("******************                                  ");
  } else if (gauge == 4) {
    printf("***********************                             ");
  } else if (gauge == 5) {
    printf("**************************                          ");
  } else if (gauge == 6) {
    printf("*******************************                     ");
  } else if (gauge == 7) {
    printf("***********************************                 ");
  } else if (gauge == 8) {
    printf("*****************************************           ");
  } else {
    printf("**********************************************      ");
  }
  fflush(NULL);
  printf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%"
         "c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c",
         0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
         0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
         0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
         0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08,
         0x08, 0x08, 0x08, 0x08);
}


x86 assembly (clang, -O0):
<gauge_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cvtsi2sd %eax,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jg     1160 <gauge_print+0x40>
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125c <gauge_print+0x13c>
cmpl   $0x2,-0xc(%rbp)
jne    117d <gauge_print+0x5d>
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1257 <gauge_print+0x137>
cmpl   $0x3,-0xc(%rbp)
jne    119a <gauge_print+0x7a>
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1252 <gauge_print+0x132>
cmpl   $0x4,-0xc(%rbp)
jne    11b7 <gauge_print+0x97>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124d <gauge_print+0x12d>
cmpl   $0x5,-0xc(%rbp)
jne    11d4 <gauge_print+0xb4>
lea    0xf0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1248 <gauge_print+0x128>
cmpl   $0x6,-0xc(%rbp)
jne    11f1 <gauge_print+0xd1>
lea    0xf24(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1243 <gauge_print+0x123>
cmpl   $0x7,-0xc(%rbp)
jne    120e <gauge_print+0xee>
lea    0xf3c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123e <gauge_print+0x11e>
cmpl   $0x8,-0xc(%rbp)
jne    122b <gauge_print+0x10b>
lea    0xf54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1239 <gauge_print+0x119>
lea    0xf76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    123e <gauge_print+0x11e>
jmp    1243 <gauge_print+0x123>
jmp    1248 <gauge_print+0x128>
jmp    124d <gauge_print+0x12d>
jmp    1252 <gauge_print+0x132>
jmp    1257 <gauge_print+0x137>
jmp    125c <gauge_print+0x13c>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <fflush@plt>
lea    0xf71(%rip),%rdi
mov    $0x8,%r9d
mov    %r9d,%esi
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x8,(%rsp)
movl   $0x8,0x8(%rsp)
movl   $0x8,0x10(%rsp)
movl   $0x8,0x18(%rsp)
movl   $0x8,0x20(%rsp)
movl   $0x8,0x28(%rsp)
movl   $0x8,0x30(%rsp)
movl   $0x8,0x38(%rsp)
movl   $0x8,0x40(%rsp)
movl   $0x8,0x48(%rsp)
movl   $0x8,0x50(%rsp)
movl   $0x8,0x58(%rsp)
movl   $0x8,0x60(%rsp)
movl   $0x8,0x68(%rsp)
movl   $0x8,0x70(%rsp)
movl   $0x8,0x78(%rsp)
movl   $0x8,0x80(%rsp)
movl   $0x8,0x88(%rsp)
movl   $0x8,0x90(%rsp)
movl   $0x8,0x98(%rsp)
movl   $0x8,0xa0(%rsp)
movl   $0x8,0xa8(%rsp)
movl   $0x8,0xb0(%rsp)
movl   $0x8,0xb8(%rsp)
movl   $0x8,0xc0(%rsp)
movl   $0x8,0xc8(%rsp)
movl   $0x8,0xd0(%rsp)
movl   $0x8,0xd8(%rsp)
movl   $0x8,0xe0(%rsp)
movl   $0x8,0xe8(%rsp)
movl   $0x8,0xf0(%rsp)
movl   $0x8,0xf8(%rsp)
movl   $0x8,0x100(%rsp)
movl   $0x8,0x108(%rsp)
movl   $0x8,0x110(%rsp)
movl   $0x8,0x118(%rsp)
movl   $0x8,0x120(%rsp)
movl   $0x8,0x128(%rsp)
movl   $0x8,0x130(%rsp)
movl   $0x8,0x138(%rsp)
movl   $0x8,0x140(%rsp)
movl   $0x8,0x148(%rsp)
movl   $0x8,0x150(%rsp)
movl   $0x8,0x158(%rsp)
movl   $0x8,0x160(%rsp)
movl   $0x8,0x168(%rsp)
movl   $0x8,0x170(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gauge_print>:
push   %rax
mov    %edi,%eax
cltd
idiv   %esi
cmp    $0x2,%eax
jge    1134 <gauge_print+0x14>
lea    0xece(%rip),%rdi
jmp    1155 <gauge_print+0x35>
add    $0xfffffffe,%eax
cmp    $0x6,%eax
ja     114e <gauge_print+0x2e>
cltq
lea    0x1103(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1155 <gauge_print+0x35>
lea    0x1053(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <fflush@plt>
sub    $0x8,%rsp
lea    0x106f(%rip),%rdi
mov    $0x8,%esi
mov    $0x8,%edx
mov    $0x8,%ecx
mov    $0x8,%r8d
mov    $0x8,%r9d
xor    %eax,%eax
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
push   $0x8
call   1030 <printf@plt>
add    $0x180,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [53 x i8] c"***** \00"
@.str.1 = [53 x i8] c"********** \00"
@.str.2 = [53 x i8] c"****************** \00"
@.str.3 = [53 x i8] c"*********************** \00"
@.str.4 = [53 x i8] c"************************** \00"
@.str.5 = [53 x i8] c"******************************* \00"
@.str.6 = [53 x i8] c"*********************************** \00"
@.str.7 = [53 x i8] c"***************************************** \00"
@.str.8 = [53 x i8] c"********************************************** \00"
@.str.9 = [105 x i8] c"%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\00"
define void @gauge_print(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sdiv i32 %6, %7
%9 = sitofp i32 %8 to double
%10 = fptosi double %9 to i32
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp sle i32 %11, 1
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
br label %59
15: ; preds = %2
%16 = load i32, i32* %5
%17 = icmp eq i32 %16, 2
br i1 %17, label %18, label %20
18: ; preds = %15
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
br label %58
20: ; preds = %15
%21 = load i32, i32* %5
%22 = icmp eq i32 %21, 3
br i1 %22, label %23, label %25
23: ; preds = %20
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0))
br label %57
25: ; preds = %20
%26 = load i32, i32* %5
%27 = icmp eq i32 %26, 4
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.3, i64 0, i64 0))
br label %56
30: ; preds = %25
%31 = load i32, i32* %5
%32 = icmp eq i32 %31, 5
br i1 %32, label %33, label %35
33: ; preds = %30
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.4, i64 0, i64 0))
br label %55
35: ; preds = %30
%36 = load i32, i32* %5
%37 = icmp eq i32 %36, 6
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.5, i64 0, i64 0))
br label %54
40: ; preds = %35
%41 = load i32, i32* %5
%42 = icmp eq i32 %41, 7
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0))
br label %53
45: ; preds = %40
%46 = load i32, i32* %5
%47 = icmp eq i32 %46, 8
br i1 %47, label %48, label %50
48: ; preds = %45
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.7, i64 0, i64 0))
br label %52
50: ; preds = %45
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.8, i64 0, i64 0))
br label %52
52: ; preds = %50, %48
br label %53
53: ; preds = %52, %43
br label %54
54: ; preds = %53, %38
br label %55
55: ; preds = %54, %33
br label %56
56: ; preds = %55, %28
br label %57
57: ; preds = %56, %23
br label %58
58: ; preds = %57, %18
br label %59
59: ; preds = %58, %13
%60 = call i32 @fflush(i32* null)
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.9, i64 0, i64 0), i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8)
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"***** \00"
@.str.1 = [53 x i8] c"********** \00"
@.str.2 = [53 x i8] c"****************** \00"
@.str.3 = [53 x i8] c"*********************** \00"
@.str.4 = [53 x i8] c"************************** \00"
@.str.5 = [53 x i8] c"******************************* \00"
@.str.6 = [53 x i8] c"*********************************** \00"
@.str.7 = [53 x i8] c"***************************************** \00"
@.str.8 = [53 x i8] c"********************************************** \00"
@.str.9 = [105 x i8] c"%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\00"
@reltable.gauge_print = [7 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([53 x i8]* @.str.1 to i64), i64 ptrtoint ([7 x i32]* @reltable.gauge_print to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([53 x i8]* @.str.2 to i64), i64 ptrtoint ([7 x i32]* @reltable.gauge_print to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([53 x i8]* @.str.3 to i64), i64 ptrtoint ([7 x i32]* @reltable.gauge_print to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([53 x i8]* @.str.4 to i64), i64 ptrtoint ([7 x i32]* @reltable.gauge_print to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([53 x i8]* @.str.5 to i64), i64 ptrtoint ([7 x i32]* @reltable.gauge_print to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([53 x i8]* @.str.6 to i64), i64 ptrtoint ([7 x i32]* @reltable.gauge_print to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([53 x i8]* @.str.7 to i64), i64 ptrtoint ([7 x i32]* @reltable.gauge_print to i64)) to i32)]
define void @gauge_print(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = icmp slt i32 %3, 2
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = add i32 %3, -2
%7 = icmp ult i32 %6, 7
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = sext i32 %6 to i64
%10 = shl i64 %9, 2
%11 = call i8* @llvm.load.relative.i64(i8* bitcast ([7 x i32]* @reltable.gauge_print to i8*), i64 %10)
br label %12
12: ; preds = %5, %8, %2
%13 = phi i8* [ getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), %2 ], [ %11, %8 ], [ getelementptr inbounds ([53 x i8], [53 x i8]* @.str.8, i64 0, i64 0), %5 ]
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %13)
%15 = tail call i32 @fflush(i32* null)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([105 x i8], [105 x i8]* @.str.9, i64 0, i64 0), i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8)
ret void
}