#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 */
scalar_t__ asprintf(char **, char *, char *, char *, char *, char *, char *);
int display_column_name(char *);
int /*<<< orphan*/ free(char *);
int clock_print_header(void) {
  char *buf;
  int ret;
  if (asprintf(&buf, "%-55s %-16s %-12s %-9s %-8s", "Name", "Flags", "Rate",
               "Usecount", "Children") < 0)
    return -1;
  ret = display_column_name(buf);
  free(buf);
  return ret;
}


x86 assembly (clang, -O0):
<clock_print_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
lea    0xebd(%rip),%rsi
lea    0xed2(%rip),%rdx
lea    0xed0(%rip),%rcx
lea    0xecf(%rip),%r8
lea    0xecd(%rip),%r9
lea    0xecf(%rip),%rax
mov    %rax,(%rsp)
call   1050 <asprintf@plt>
cmp    $0x0,%rax
jge    1185 <clock_print_header+0x55>
movl   $0xffffffff,-0x4(%rbp)
jmp    11a0 <clock_print_header+0x70>
mov    -0x10(%rbp),%rdi
call   1040 <display_column_name@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_print_header>:
push   %rbx
sub    $0x10,%rsp
lea    0xef9(%rip),%rax
mov    %rax,(%rsp)
lea    0xeb9(%rip),%rsi
lea    0xece(%rip),%rdx
lea    0xecc(%rip),%rcx
lea    0xecb(%rip),%r8
lea    0xec9(%rip),%r9
lea    0x8(%rsp),%rdi
call   1050 <asprintf@plt>
test   %rax,%rax
js     118a <clock_print_header+0x5a>
mov    0x8(%rsp),%rdi
call   1040 <display_column_name@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
jmp    118f <clock_print_header+0x5f>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"%-55s %-16s %-12s %-9s %-8s\00"
@.str.1 = [5 x i8] c"Name\00"
@.str.2 = [6 x i8] c"Flags\00"
@.str.3 = [5 x i8] c"Rate\00"
@.str.4 = [9 x i8] c"Usecount\00"
@.str.5 = [9 x i8] c"Children\00"
define i32 @clock_print_header() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = call i64 @asprintf(i8** %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 -1, i32* %1
br label %13
7: ; preds = %0
%8 = load i8*, i8** %2
%9 = call i32 @display_column_name(i8* %8)
store i32 %9, i32* %3
%10 = load i8*, i8** %2
%11 = call i32 @free(i8* %10)
%12 = load i32, i32* %3
store i32 %12, i32* %1
br label %13
13: ; preds = %7, %6
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
@.str = [28 x i8] c"%-55s %-16s %-12s %-9s %-8s\00"
@.str.1 = [5 x i8] c"Name\00"
@.str.2 = [6 x i8] c"Flags\00"
@.str.3 = [5 x i8] c"Rate\00"
@.str.4 = [9 x i8] c"Usecount\00"
@.str.5 = [9 x i8] c"Children\00"
define i32 @clock_print_header() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = call i64 @asprintf(i8** %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%4 = icmp slt i64 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = call i32 @display_column_name(i8* %6)
%8 = load i8*, i8** %1
%9 = call i32 @free(i8* %8)
br label %10
10: ; preds = %0, %5
%11 = phi i32 [ %7, %5 ], [ -1, %0 ]
ret i32 %11
}