#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 show_port_stats_header(const char *ifname, int interval) {
  printf("\n");
  printf("%-15s interval: %-2d                            Err  Inv  "
         "IvTx Link Cntl Input     Input     Output    Output\n",
         ifname, interval);
  printf("Seconds TxFrames  TxBytes      RxFrames  RxBytes        "
         "Frms CRC  Byte Fail Reqs Requests  MBytes    "
         "Requests  MBytes\n");
  printf("------- --------- ------------ --------- -------------- "
         "---- ---- ---- ---- ---- --------- --------- "
         "--------- ---------\n");
}


x86 assembly (clang, -O0):
<show_port_stats_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0x1038(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf26(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_port_stats_header>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf13(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7d(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [111 x i8] c"%-15s interval: %-2d Err Inv IvTx Link Cntl Input Input Output Output\0A\00"
@.str.2 = [119 x i8] c"Seconds TxFrames TxBytes RxFrames RxBytes Frms CRC Byte Fail Reqs Requests MBytes Requests MBytes\0A\00"
@.str.3 = [122 x i8] c"------- --------- ------------ --------- -------------- ---- ---- ---- ---- ---- --------- --------- --------- ---------\0A\00"
define void @show_port_stats_header(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([111 x i8], [111 x i8]* @.str.1, i64 0, i64 0), i8* %6, i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([119 x i8], [119 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([122 x i8], [122 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [111 x i8] c"%-15s interval: %-2d Err Inv IvTx Link Cntl Input Input Output Output\0A\00"
@str = [118 x i8] c"Seconds TxFrames TxBytes RxFrames RxBytes Frms CRC Byte Fail Reqs Requests MBytes Requests MBytes\00"
@str.4 = [121 x i8] c"------- --------- ------------ --------- -------------- ---- ---- ---- ---- ---- --------- --------- --------- ---------\00"
define void @show_port_stats_header(i8* %0, i32 %1) {
%3 = tail call i32 @putchar(i32 10)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([111 x i8], [111 x i8]* @.str.1, i64 0, i64 0), i8* %0, i32 %1)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([118 x i8], [118 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([121 x i8], [121 x i8]* @str.4, i64 0, i64 0))
ret void
}