#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*/ fprintf(int /*<<< orphan*/, char *, long, long, long, double,
                           long, long);
int /*<<< orphan*/ stderr;
void print_status(long block, long start_block, long end_block, long ok_count,
                  long bad_count, long done_count) {
  fprintf(stderr,
          "\rblock %09ld (%09ld-%09ld, %.2f%%)   "
          "ok %09ld   bad %09ld   ",
          block, start_block, end_block,
          (100.0 * done_count) / (end_block - start_block), ok_count,
          bad_count);
}


x86 assembly (clang, -O0):
<print_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
cvtsi2sdq -0x30(%rbp),%xmm1
movsd  0xead(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%r9
mov    -0x28(%rbp),%rax
lea    0xe91(%rip),%rsi
mov    %rax,(%rsp)
call   1030 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_status>:
push   %rax
mov    %rcx,%r10
mov    %rdx,%rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ebc(%rip),%rsi
mov    (%rsi),%edi
cvtsi2sd %r9,%xmm0
mulsd  0xecd(%rip),%xmm0
mov    %rax,%rsi
sub    %rcx,%rsi
cvtsi2sd %rsi,%xmm1
divsd  %xmm1,%xmm0
mov    %r8,(%rsp)
lea    0xebb(%rip),%rsi
mov    %rax,%r8
mov    %r10,%r9
call   1030 <fprintf@plt>
pop    %rax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [61 x i8] c"\0Dblock %09ld (%09ld-%09ld, %.2f%%) ok %09ld bad %09ld \00"
define void @print_status(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
store i64 %0, i64* %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i64 %3, i64* %10
store i64 %4, i64* %11
store i64 %5, i64* %12
%13 = load i32, i32* @stderr
%14 = load i64, i64* %7
%15 = load i64, i64* %8
%16 = load i64, i64* %9
%17 = load i64, i64* %12
%18 = sitofp i64 %17 to double
%19 = fmul double 1.000000e+02, %18
%20 = load i64, i64* %9
%21 = load i64, i64* %8
%22 = sub nsw i64 %20, %21
%23 = sitofp i64 %22 to double
%24 = fdiv double %19, %23
%25 = load i64, i64* %10
%26 = load i64, i64* %11
%27 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i64 %14, i64 %15, i64 %16, double %24, i64 %25, i64 %26)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [61 x i8] c"\0Dblock %09ld (%09ld-%09ld, %.2f%%) ok %09ld bad %09ld \00"
define void @print_status(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = load i32, i32* @stderr
%8 = sitofp i64 %5 to double
%9 = fmul double %8, 1.000000e+02
%10 = sub nsw i64 %2, %1
%11 = sitofp i64 %10 to double
%12 = fdiv double %9, %11
%13 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1, i64 %2, double %12, i64 %3, i64 %4)
ret void
}