#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 */
char *bar_str(char);
int /*<<< orphan*/ printf(char *, char *, char, char *, char *, char, char,
                          char, char);
void print_progr_bm(char perc_f, char perc_t, char *bps, char eta_s, char eta_m,
                    char eta_h) {
  printf("\rFile: %s %3d%% @ %s/s  Total: %s %3d%% ETA %02d:%02d:%02d   ",
         bar_str(perc_f), perc_f, bps, bar_str(perc_t), perc_t, eta_h, eta_m,
         eta_s);
  return;
}


x86 assembly (clang, -O0):
<print_progr_bm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %r8d,-0x48(%rbp)
mov    %ecx,%eax
mov    -0x48(%rbp),%ecx
mov    %eax,-0x44(%rbp)
mov    %rdx,%rax
mov    -0x44(%rbp),%edx
mov    %rax,-0x40(%rbp)
mov    %esi,%eax
mov    -0x40(%rbp),%rsi
mov    %eax,-0x34(%rbp)
mov    %edi,%r8d
mov    -0x34(%rbp),%edi
mov    %r9b,%al
mov    %r8b,-0x1(%rbp)
mov    %dil,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %dl,-0x11(%rbp)
mov    %cl,-0x12(%rbp)
mov    %al,-0x13(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <bar_str@plt>
mov    %rax,-0x30(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x21(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movsbl -0x2(%rbp),%edi
call   1040 <bar_str@plt>
mov    -0x30(%rbp),%rsi
mov    -0x21(%rbp),%dl
mov    -0x20(%rbp),%rcx
mov    %rax,%r8
mov    -0x2(%rbp),%r9b
mov    -0x13(%rbp),%r10b
mov    -0x12(%rbp),%al
lea    0xe57(%rip),%rdi
movsbl %dl,%edx
movsbl %r9b,%r9d
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
movsbl %al,%eax
mov    %eax,0x8(%rsp)
movsbl -0x11(%rbp),%eax
mov    %eax,0x10(%rsp)
call   1030 <printf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_progr_bm>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,(%rsp)
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %rdx,%r13
mov    %esi,%ebp
mov    %edi,%ebx
call   1040 <bar_str@plt>
mov    %rax,%r14
mov    %ebp,%edi
call   1040 <bar_str@plt>
sub    $0x8,%rsp
lea    0xeaa(%rip),%rdi
mov    %r14,%rsi
mov    %ebx,%edx
mov    %r13,%rcx
mov    %rax,%r8
mov    %ebp,%r9d
push   %r12
push   %r15
push   0x18(%rsp)
call   1030 <printf@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [62 x i8] c"\0DFile: %s %3d%% @ %s/s Total: %s %3d%% ETA %02d:%02d:%02d \00"
define void @print_progr_bm(i8 signext %0, i8 signext %1, i8* %2, i8 signext %3, i8 signext %4, i8 signext %5) {
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8*
%10 = alloca i8
%11 = alloca i8
%12 = alloca i8
store i8 %0, i8* %7
store i8 %1, i8* %8
store i8* %2, i8** %9
store i8 %3, i8* %10
store i8 %4, i8* %11
store i8 %5, i8* %12
%13 = load i8, i8* %7
%14 = call i8* @bar_str(i8 signext %13)
%15 = load i8, i8* %7
%16 = load i8*, i8** %9
%17 = load i8, i8* %8
%18 = call i8* @bar_str(i8 signext %17)
%19 = load i8, i8* %8
%20 = load i8, i8* %12
%21 = load i8, i8* %11
%22 = load i8, i8* %10
%23 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %14, i8 signext %15, i8* %16, i8* %18, i8 signext %19, i8 signext %20, i8 signext %21, i8 signext %22)
ret void
}

LLVM IR (-O2):
@.str = [62 x i8] c"\0DFile: %s %3d%% @ %s/s Total: %s %3d%% ETA %02d:%02d:%02d \00"
define void @print_progr_bm(i8 signext %0, i8 signext %1, i8* %2, i8 signext %3, i8 signext %4, i8 signext %5) {
%7 = tail call i8* @bar_str(i8 signext %0)
%8 = tail call i8* @bar_str(i8 signext %1)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %7, i8 signext %0, i8* %2, i8* %8, i8 signext %1, i8 signext %5, i8 signext %4, i8 signext %3)
ret void
}