#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 *, int, int);
int /*<<< orphan*/ putchar(char);
void show_print(int percent, int barlen, int ture) {
  int i;
  int m, n;
  m = ture % 10;
  n = ture / 10;
  percent = m * 2 + n * 2;
  putchar('[');
  for (i = 1; i <= barlen; ++i)
    putchar(i * 100 <= percent * barlen ? '>' : ' ');
  putchar(']');
  printf("%3d.%dC", n, m);
  for (i = 0; i != barlen + 12; ++i)
    putchar('\b');
}


x86 assembly (clang, -O0):
<show_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x5b,%edi
call   1030 <putchar@plt>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     11ab <show_print+0x8b>
imul   $0x64,-0x10(%rbp),%edx
mov    -0x4(%rbp),%esi
imul   -0x8(%rbp),%esi
mov    $0x20,%eax
mov    $0x3e,%ecx
cmp    %esi,%edx
cmovle %ecx,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116f <show_print+0x4f>
mov    $0x5d,%edi
call   1030 <putchar@plt>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe3e(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0xc,%ecx
cmp    %ecx,%eax
je     11f7 <show_print+0xd7>
mov    $0x8,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11ce <show_print+0xae>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_print>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,%r14d
movslq %edx,%rcx
imul   $0x66666667,%rcx,%r15
mov    %r15,%rax
shr    $0x3f,%rax
sar    $0x22,%r15
add    %eax,%r15d
lea    (%r15,%r15,1),%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ecx
mov    %rcx,(%rsp)
mov    $0x5b,%edi
call   1030 <putchar@plt>
test   %r14d,%r14d
jle    1199 <show_print+0x79>
mov    (%rsp),%rax
lea    (%rax,%r15,1),%r12d
imul   %r14d,%r12d
add    %r12d,%r12d
mov    $0x64,%ebp
mov    $0x20,%r13d
mov    %r14d,%ebx
nop
cmp    %r12d,%ebp
mov    $0x3e,%edi
cmovg  %r13d,%edi
call   1030 <putchar@plt>
add    $0x64,%ebp
add    $0xffffffff,%ebx
jne    1180 <show_print+0x60>
mov    $0x5d,%edi
call   1030 <putchar@plt>
lea    0xe56(%rip),%rdi
mov    %r15d,%esi
mov    (%rsp),%rdx
call   1040 <printf@plt>
add    $0xc,%r14d
je     11d0 <show_print+0xb0>
nopl   0x0(%rax)
mov    $0x8,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r14d
jne    11c0 <show_print+0xa0>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%3d.%dC\00"
define void @show_print(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %6
%11 = srem i32 %10, 10
store i32 %11, i32* %8
%12 = load i32, i32* %6
%13 = sdiv i32 %12, 10
store i32 %13, i32* %9
%14 = load i32, i32* %8
%15 = mul nsw i32 %14, 2
%16 = load i32, i32* %9
%17 = mul nsw i32 %16, 2
%18 = add nsw i32 %15, %17
store i32 %18, i32* %4
%19 = call i32 @putchar(i8 signext 91)
store i32 1, i32* %7
br label %20
20: ; preds = %35, %3
%21 = load i32, i32* %7
%22 = load i32, i32* %5
%23 = icmp sle i32 %21, %22
br i1 %23, label %24, label %38
24: ; preds = %20
%25 = load i32, i32* %7
%26 = mul nsw i32 %25, 100
%27 = load i32, i32* %4
%28 = load i32, i32* %5
%29 = mul nsw i32 %27, %28
%30 = icmp sle i32 %26, %29
%31 = zext i1 %30 to i64
%32 = select i1 %30, i32 62, i32 32
%33 = trunc i32 %32 to i8
%34 = call i32 @putchar(i8 signext %33)
br label %35
35: ; preds = %24
%36 = load i32, i32* %7
%37 = add nsw i32 %36, 1
store i32 %37, i32* %7
br label %20
38: ; preds = %20
%39 = call i32 @putchar(i8 signext 93)
%40 = load i32, i32* %9
%41 = load i32, i32* %8
%42 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %40, i32 %41)
store i32 0, i32* %7
br label %43
43: ; preds = %50, %38
%44 = load i32, i32* %7
%45 = load i32, i32* %5
%46 = add nsw i32 %45, 12
%47 = icmp ne i32 %44, %46
br i1 %47, label %48, label %53
48: ; preds = %43
%49 = call i32 @putchar(i8 signext 8)
br label %50
50: ; preds = %48
%51 = load i32, i32* %7
%52 = add nsw i32 %51, 1
store i32 %52, i32* %7
br label %43
53: ; preds = %43
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%3d.%dC\00"
define void @show_print(i32 %0, i32 %1, i32 %2) {
%4 = srem i32 %2, 10
%5 = sdiv i32 %2, 10
%6 = tail call i32 @putchar(i8 signext 91)
%7 = icmp slt i32 %1, 1
br i1 %7, label %20, label %8
8: ; preds = %3
%9 = add nsw i32 %4, %5
%10 = shl nuw i32 %1, 1
%11 = mul i32 %10, %9
br label %12
12: ; preds = %8, %12
%13 = phi i32 [ 1, %8 ], [ %18, %12 ]
%14 = mul nsw i32 %13, 100
%15 = icmp sgt i32 %14, %11
%16 = select i1 %15, i8 32, i8 62
%17 = tail call i32 @putchar(i8 signext %16)
%18 = add nuw i32 %13, 1
%19 = icmp eq i32 %13, %1
br i1 %19, label %20, label %12
20: ; preds = %12, %3
%21 = tail call i32 @putchar(i8 signext 93)
%22 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %4)
%23 = add nsw i32 %1, 12
%24 = icmp eq i32 %23, 0
br i1 %24, label %30, label %25
25: ; preds = %20, %25
%26 = phi i32 [ %28, %25 ], [ 0, %20 ]
%27 = tail call i32 @putchar(i8 signext 8)
%28 = add nuw nsw i32 %26, 1
%29 = icmp eq i32 %28, %23
br i1 %29, label %30, label %25
30: ; preds = %25, %20
ret void
}