#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 *, ...);
void header_display_bandwidth(int show_date, int show_time, int show_mb) {
  if (show_date) {
    printf("      ");
  }
  if (show_time) {
    printf("         ");
  }
  printf("%-6s %9s %9s %9s\n", "", "in", "out", "total");
  if (show_date) {
    printf("date  ");
  }
  if (show_time) {
    printf("time     ");
  }
  printf("%-6s %9s ", "iface", show_mb ? "mbytes" : "kbytes");
  printf("%9s %9s %9s ", show_mb ? "mbytes" : "kbytes",
         show_mb ? "mbytes" : "kbytes", show_mb ? "MB/s" : "KB/s");
  printf("%5s %5s\n", "err", "coll");
}


x86 assembly (clang, -O0):
<header_display_bandwidth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1139 <header_display_bandwidth+0x29>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
je     1151 <header_display_bandwidth+0x41>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb2(%rip),%rdi
lea    0xf18(%rip),%rsi
lea    0xeb6(%rip),%rdx
lea    0xeb2(%rip),%rcx
lea    0xeaf(%rip),%r8
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x4(%rbp)
je     1193 <header_display_bandwidth+0x83>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
je     11ab <header_display_bandwidth+0x9b>
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%ecx
lea    0xe9c(%rip),%rdx
lea    0xe8e(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
lea    0xe70(%rip),%rdi
lea    0xe73(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%ecx
lea    0xe6f(%rip),%rsi
lea    0xe61(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    -0xc(%rbp),%ecx
lea    0xe57(%rip),%rdx
lea    0xe49(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0xc(%rbp),%edi
lea    0xe58(%rip),%rcx
lea    0xe4c(%rip),%rax
cmp    $0x0,%edi
cmovne %rax,%rcx
lea    0xe31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe3a(%rip),%rdi
lea    0xe3c(%rip),%rsi
lea    0xe39(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<header_display_bandwidth>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
test   %edi,%edi
je     112d <header_display_bandwidth+0x1d>
lea    0xedd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
test   %ebp,%ebp
je     113f <header_display_bandwidth+0x2f>
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
lea    0xf2a(%rip),%rsi
lea    0xec8(%rip),%rdx
lea    0xec4(%rip),%rcx
lea    0xec1(%rip),%r8
xor    %eax,%eax
call   1030 <printf@plt>
test   %ebx,%ebx
je     117b <header_display_bandwidth+0x6b>
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
test   %ebp,%ebp
je     118d <header_display_bandwidth+0x7d>
lea    0xeaa(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
test   %r14d,%r14d
lea    0xeba(%rip),%rax
lea    0xeac(%rip),%rbx
cmove  %rax,%rbx
lea    0xe91(%rip),%rdi
lea    0xe94(%rip),%rsi
lea    0xeb3(%rip),%rax
lea    0xea7(%rip),%rbp
cmove  %rax,%rbp
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe85(%rip),%rdi
mov    %rbx,%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe85(%rip),%rdi
lea    0xe87(%rip),%rsi
lea    0xe84(%rip),%rdx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c" \00"
@.str.1 = [10 x i8] c" \00"
@.str.2 = [18 x i8] c"%-6s %9s %9s %9s\0A\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [3 x i8] c"in\00"
@.str.5 = [4 x i8] c"out\00"
@.str.6 = [6 x i8] c"total\00"
@.str.7 = [7 x i8] c"date \00"
@.str.8 = [10 x i8] c"time \00"
@.str.9 = [10 x i8] c"%-6s %9s \00"
@.str.10 = [6 x i8] c"iface\00"
@.str.11 = [7 x i8] c"mbytes\00"
@.str.12 = [7 x i8] c"kbytes\00"
@.str.13 = [13 x i8] c"%9s %9s %9s \00"
@.str.14 = [5 x i8] c"MB/s\00"
@.str.15 = [5 x i8] c"KB/s\00"
@.str.16 = [9 x i8] c"%5s %5s\0A\00"
@.str.17 = [4 x i8] c"err\00"
@.str.18 = [5 x i8] c"coll\00"
define void @header_display_bandwidth(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %3
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %11
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %22
22: ; preds = %20, %16
%23 = load i32, i32* %5
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
br label %27
27: ; preds = %25, %22
%28 = load i32, i32* %6
%29 = icmp ne i32 %28, 0
%30 = zext i1 %29 to i64
%31 = select i1 %29, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* %31)
%33 = load i32, i32* %6
%34 = icmp ne i32 %33, 0
%35 = zext i1 %34 to i64
%36 = select i1 %34, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0)
%37 = load i32, i32* %6
%38 = icmp ne i32 %37, 0
%39 = zext i1 %38 to i64
%40 = select i1 %38, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0)
%41 = load i32, i32* %6
%42 = icmp ne i32 %41, 0
%43 = zext i1 %42 to i64
%44 = select i1 %42, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0)
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8* %36, i8* %40, i8* %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c" \00"
@.str.1 = [10 x i8] c" \00"
@.str.2 = [18 x i8] c"%-6s %9s %9s %9s\0A\00"
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [3 x i8] c"in\00"
@.str.5 = [4 x i8] c"out\00"
@.str.6 = [6 x i8] c"total\00"
@.str.7 = [7 x i8] c"date \00"
@.str.8 = [10 x i8] c"time \00"
@.str.9 = [10 x i8] c"%-6s %9s \00"
@.str.10 = [6 x i8] c"iface\00"
@.str.11 = [7 x i8] c"mbytes\00"
@.str.12 = [7 x i8] c"kbytes\00"
@.str.13 = [13 x i8] c"%9s %9s %9s \00"
@.str.14 = [5 x i8] c"MB/s\00"
@.str.15 = [5 x i8] c"KB/s\00"
@.str.16 = [9 x i8] c"%5s %5s\0A\00"
@.str.17 = [4 x i8] c"err\00"
@.str.18 = [5 x i8] c"coll\00"
define void @header_display_bandwidth(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = icmp eq i32 %1, 0
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
br i1 %4, label %15, label %13
13: ; preds = %11
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
br i1 %8, label %18, label %16
16: ; preds = %15
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0))
br label %18
18: ; preds = %16, %15
%19 = icmp eq i32 %2, 0
%20 = select i1 %19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* %20)
%22 = select i1 %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.13, i64 0, i64 0), i8* %20, i8* %20, i8* %22)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0))
ret void
}