#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ stdout;
scalar_t__ system(char *);
scalar_t__ timlib_file_populated(char *);
void timlib_display_error_file(char *error_filename) {
  if (timlib_file_populated(error_filename)) {
    char sys_string[1024];
    sprintf(sys_string,
            "cat %s | queue_top_bottom_lines.e 50 | html_table.e 'Load Errors' "
            "'' ''",
            error_filename);
    fflush(stdout);
    if (system(sys_string)) {
    }
  }
}


x86 assembly (clang, -O0):
<timlib_display_error_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <timlib_file_populated@plt>
cmp    $0x0,%rax
je     11a7 <timlib_display_error_file+0x67>
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe8c(%rip),%rsi
call   1060 <sprintf@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
je     11a2 <timlib_display_error_file+0x62>
jmp    11a2 <timlib_display_error_file+0x62>
jmp    11a7 <timlib_display_error_file+0x67>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timlib_display_error_file>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
call   1040 <timlib_file_populated@plt>
test   %rax,%rax
je     1182 <timlib_display_error_file+0x42>
lea    0xea2(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rdx
call   1060 <sprintf@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    %r14,%rdi
call   1030 <system@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [72 x i8] c"cat %s | queue_top_bottom_lines.e 50 | html_table.e 'Load Errors' '' ''\00"
@stdout = global i32 0
define void @timlib_display_error_file(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @timlib_file_populated(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %18
7: ; preds = %1
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%9 = load i8*, i8** %2
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32, i32* @stdout
%12 = call i32 @fflush(i32 %11)
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%14 = call i64 @system(i8* %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %7
br label %17
17: ; preds = %16, %7
br label %18
18: ; preds = %17, %1
ret void
}

LLVM IR (-O2):
@.str = [72 x i8] c"cat %s | queue_top_bottom_lines.e 50 | html_table.e 'Load Errors' '' ''\00"
@stdout = global i32 0
define void @timlib_display_error_file(i8* %0) {
%2 = alloca [1024 x i8]
%3 = tail call i64 @timlib_file_populated(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = load i32, i32* @stdout
%9 = tail call i32 @fflush(i32 %8)
%10 = call i64 @system(i8* %6)
br label %11
11: ; preds = %5, %1
ret void
}