#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*/ HpmDisplayLine(char *, int);
int /*<<< orphan*/ printf(char *);
void HpmDisplayUpgradeHeader(int option) {
  printf("\n");
  HpmDisplayLine("-", 78);
  printf("|ID | Name      |                     Versions                       "
         " |  %%   |\n");
  printf("|   |           |      Active     |      Backup     |      File      "
         " |      |\n");
  printf("|---|-----------|-----------------|-----------------|----------------"
         "-|------|\n");
}


x86 assembly (clang, -O0):
<HpmDisplayUpgradeHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xf6f(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
mov    $0x4e,%esi
call   1040 <HpmDisplayLine@plt>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
lea    0xef8(%rip),%rdi
call   1030 <printf@plt>
lea    0xf3c(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HpmDisplayUpgradeHeader>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeae(%rip),%rdi
mov    $0x4e,%esi
call   1060 <HpmDisplayLine@plt>
lea    0xe9f(%rip),%rdi
call   1050 <printf@plt>
lea    0xee4(%rip),%rdi
call   1040 <puts@plt>
lea    0xf27(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [2 x i8] c"-\00"
@.str.2 = [81 x i8] c"|ID | Name | Versions | %% |\0A\00"
@.str.3 = [80 x i8] c"| | | Active | Backup | File | |\0A\00"
@.str.4 = [80 x i8] c"|---|-----------|-----------------|-----------------|-----------------|------|\0A\00"
define void @HpmDisplayUpgradeHeader(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @HpmDisplayLine(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 78)
%5 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [2 x i8] c"-\00"
@.str.2 = [81 x i8] c"|ID | Name | Versions | %% |\0A\00"
@str = [79 x i8] c"| | | Active | Backup | File | |\00"
@str.5 = [79 x i8] c"|---|-----------|-----------------|-----------------|-----------------|------|\00"
define void @HpmDisplayUpgradeHeader(i32 %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @HpmDisplayLine(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 78)
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.5, i64 0, i64 0))
ret void
}